|
View previous topic :: View next topic
|
| Author |
Message |
vasanthz
Global Moderator

Joined: 28 Aug 2007 Posts: 1753 Location: Tirupur, India
|
|
|
|
Hello,
You could use the below job, provided that there are no data on fields from positions 73-80 on both the files.
| Code: |
//STEP1 EXEC PGM=ICETOOL
//SORTIN1 DD DSN=WELLS.SORTIN.FILE1,DISP=SHR
//SORTIN2 DD DSN=WELLS.SORTIN2.FILE2,DISP=SHR
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TEMP1 DD DSN=&&TEMP1,UNIT=SYSDA,SPACE=(TRK,(10,15)),
// DISP=(MOD,PASS)
//SORTOUT DD DSN=WELLS.SORTOUT,DISP=OLD
//TOOLIN DD *
COPY FROM(SORTIN2) TO(TEMP1) USING(CTL1)
COPY FROM(SORTIN1) TO(TEMP1) USING(CTL2)
SPLICE FROM(TEMP1) TO(SORTOUT) ON(73,8,PD) WITH(11,10) USING(CTL3)
/*
//CTL1CNTL DD *
OUTREC BUILD=(1:1,10,73:SEQNUM,8,PD)
/*
//CTL2CNTL DD *
OUTREC BUILD=(11:11,10,73:SEQNUM,8,PD)
/*
//CTL3CNTL DD *
OUTFIL BUILD=(1,20,60X)
/* |
Code Based on Frank's "SMART DFSORT TRICKS" PDF.
Hope it helps. |
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
Aslam,
If you have latest PTF for DFSort installed, this can be done using JOINKEYS...
| Code: |
//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD *
AAAAABBBBBCCCCCDDDDD
EEEEEFFFFFGGGGGHHHHH
/*
//SORTJNF2 DD *
11111222223333344444
55555666667777788888
/*
//SORTOUT DD your output file
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(21,08,A),SORTED,NOSEQCK
JOINKEYS FILE=F2,FIELDS=(21,08,A),SORTED,NOSEQCK
REFORMAT FIELDS=(F2:01,10,F1:11,10)
SORT FIELDS=COPY
/*
//JNF1CNTL DD *
INREC OVERLAY=(21:SEQNUM,8,ZD)
/*
//JNF2CNTL DD *
INREC OVERLAY=(21:SEQNUM,8,ZD)
/* |
OUTPUT
| Code: |
1111122222CCCCCDDDDD
5555566666GGGGGHHHHH |
Thanks, |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
SQLCODE1,
you never fail to provide an interesting post.
Do hope that Frank or Kolusu gives you an 'atta boy'. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Quote: |
| Do hope that Frank or Kolusu gives you an 'atta boy'. |
Indeed.
I've been quite pleased with the level of contributions of many of the posters to this Forum lately (e.g. escapa, vasanthz, sqlcode1, etc). Kolusu and I (being on the West Coast of the U.S.) get in "late" compared to others. It's nice to have many of the questions answered before we even get here. Gives us more time to develop future enhancements to DFSORT and ICETOOL.
I'd like to think that all of the documentation we've written, and solutions we've posted, over the years have contributed to the knowledge of DFSORT and ICETOOL displayed on this board. I congratulate the people who have made the effort to learn the product and help others. |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
These ended up in the JCL forum in the middle of a DFSORT-turned-Syncsort topic, which later continued along different lines.
This is the original topic. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|