Author: shiitiizz
Subject: Adding records from two files into one file
Posted: Mon Sep 19, 2016 8:41 pm (GMT 5.5)
Hi,
I have a requirement to merge data from two files, into one file.
I/p file one will have data like
I/p file two will have data like
And expected o/p file is
I have used Joinkeys, below is the JCL
But the o/p is coming as
Could someone please assist me to correct the sort statement, to get the desired output.
Not able to get why the data from file1 and 2 is not appearing fully in output(Only 4 lines coming as output as shown above), and why my output record shows only zeroes.
Thanks
Subject: Adding records from two files into one file
Posted: Mon Sep 19, 2016 8:41 pm (GMT 5.5)
Hi,
I have a requirement to merge data from two files, into one file.
I/p file one will have data like
Code: |
000000000000 000659564715 004526422562 000009425035 011657232497 002803326490 000387610660 038594371066 004386175295 002615414485 000694934971 000146457750 000659179238 000000001056 000000000000 000526384935 |
I/p file two will have data like
Code: |
000000000000 000660036583 004580610248 000009440828 011636927832 002799495964 000388057654 038590421443 004388351088 002617585666 000691804474 000148143819 000641399729 000000001050 000000000000 000525559433 |
And expected o/p file is
Code: |
000000000000 000000000000 000659564715 000660036583 004526422562 004580610248 000009425035 000009440828 011657232497 011636927832 002803326490 002799495964 000387610660 000388057654 038594371066 038590421443 004386175295 004388351088 002615414485 002617585666 000694934971 000691804474 000146457750 000148143819 000659179238 000641399729 000000001056 000000001050 000000000000 000000000000 000526384935 000525559433 |
I have used Joinkeys, below is the JCL
Code: |
//STEP020 EXEC PGM=SYNCSORT //SYSOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SORTJNF1 DD DSN=FILE1,DISP=SHR //SORTJNF2 DD DSN=FILE2,DISP=SHR //OUT DD SYSOUT=* //JNF1CNTL DD * INREC OVERLAY=(13:SEQNUM,8,BI) /* //JNF2CNTL DD * INREC OVERLAY=(13:SEQNUM,8,BI) /* //SYSIN DD * JOINKEYS FILE=F1,FIELDS=(1,12,A),NOSEQCK JOINKEYS FILE=F2,FIELDS=(1,12,A),NOSEQCK REFORMAT FIELDS=(F1:1,12,F2:1,12) OPTION COPY OUTFIL FNAMES=OUT,BUILD=(1,12,X,1,12) /* |
But the o/p is coming as
Code: |
----+----1----+----2----+ 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 |
Could someone please assist me to correct the sort statement, to get the desired output.
Not able to get why the data from file1 and 2 is not appearing fully in output(Only 4 lines coming as output as shown above), and why my output record shows only zeroes.
Thanks