Quantcast
Viewing all articles
Browse latest Browse all 8500

SYNCSORT :: RE: Adding records from two files into one file

Author: shiitiizz
Posted: Mon Sep 19, 2016 8:55 pm (GMT 5.5)

Hi,

I did a correction as below

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=(13,8,A),NOSEQCK   
  JOINKEYS FILE=F2,FIELDS=(13,8,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 appending data from i/p file one alone

result
Code:

000000000000 000000000000
000659564715 000659564715
004526422562 004526422562
000009425035 000009425035
011657232497 011657232497
002803326490 002803326490
000387610660 000387610660
038594371066 038594371066
004386175295 004386175295
002615414485 002615414485
000694934971 000694934971
000146457750 000146457750
000659179238 000659179238
000000001056 000000001056
000000000000 000000000000
000526384935 000526384935


I will post my solution if I manage to get, a kind request to spot out the mistake please
_________________
Regards,
Shitiz


Viewing all articles
Browse latest Browse all 8500

Trending Articles