IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Merge two records without a common field


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Sep 16, 2010 8:32 pm
Reply with quote

thoulath,
Use below job AS IS and see if it matches your expected output.
Code:

//STEP01   EXEC  PGM=SORT                           
//SYSOUT   DD SYSOUT=*                               
//SORTJNF1 DD YOUR.FILE1                             
//SORTJNF2 DD YOUR.FILE2                             
//SORTOUT  DD SYSOUT=*                               
//JNF1CNTL DD *                                     
   INREC OVERLAY=(81:SEQNUM,8,ZD)                   
/*                                                   
//JNF2CNTL DD *                                     
   INREC OVERLAY=(81:SEQNUM,8,ZD)                   
/*                                                   
//SYSIN    DD *                                     
   JOINKEYS FILES=F1,FIELDS=(81,8,A),SORTED,NOSEQCK 
   JOINKEYS FILES=F2,FIELDS=(81,8,A),SORTED,NOSEQCK 
   REFORMAT FIELDS=(F1:1,12,F2:01,31,F1:13,31)       
   OPTION COPY                                       
/*                                                   

OUTPUT
Code:
----------- ------------------------------ ----------------------------
COPYBOOK :   AE12ATDT                                                   
LEVELNAME   FIELDNAME                                 GROUP      OFFSET
01          AE12AT-PRESENTMENT-RECORD.                GROUP      0     
05          AE12AT-PRES-ACCT-NBR                      -          6     
05          AE12AT-PRES-ACCT-NBR                      -          6     
----------- ------------------------------ ----------------------------
COPYBOOK :   AE1240DT                                                   
LEVELNAME   FIELDNAME                                 GROUP      OFFSET
01          AE1240-PRESENTMENT-RECORD.                GROUP      0     
05          AE1240-PRES-ACCT-NBR                      -          6     
05          AE1240-PRES-ACCT-NBR                      -          6     
----------- ------------------------------ ----------------------------

Thanks,
Back to top
View user's profile Send private message
thoulath

New User


Joined: 15 Sep 2010
Posts: 18
Location: chennai

PostPosted: Fri Sep 17, 2010 11:07 am
Reply with quote

Thank you for all
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top