|
View previous topic :: View next topic
|
| Author |
Message |
mkk157
Active User

Joined: 17 May 2006 Posts: 310
|
|
|
|
Below is my job to concatenate the 2 files and then o write them onto another output file ensuring that there are no duplicates.
In the same step, I like to create another file whose contents are as follows:
filename: PROD.CONTROL.FILE
Contents:
PROD.DATA.OUTPUT1 000012345 DATE
Like this, the file conatins the name of the output file (which contains the merged data records) and the record count it and the current date.
Please let me know Whether I can achieve this using the single sort card ?
| Code: |
//STEP11 EXEC PGM=SORT
//SYSOUT DD SYSOUT=A
//SORTIN DD DSN=PROD.DATA.SOURCE1,DISP=SHR
// DD DSN=PROD.DATA.SOURCE2,DISP=SHR
//SORTOUT DD DSN=PROD.DATA.OUTPUT1,
// DISP=(NEW,CATLG,DELETE),...
//SYSIN DD *
SORT FIELDS=(1,20,CH,A)
SUM FIELDS=NONE
/* |
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct, 2010), you can now use DFSORT's new SET Symbols in control statements (JPn) function to do what you asked for like this:
| Code: |
// SET DSNOUT='PROD.DATA.OUTPUT1'
//STEP11 EXEC PGM=SORT,
// PARM='JP1"&DSNOUT"'
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=PROD.DATA.SOURCE1,DISP=SHR
// DD DSN=PROD.DATA.SOURCE2,DISP=SHR
//SORTOUT DD DSN=&DSNOUT,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(5,5))
//TRL DD DSN=PROD.CONTROL.FILE,...
//SYSIN DD *
SORT FIELDS=(1,20,CH,A)
SUM FIELDS=NONE
OUTFIL FNAMES=SORTOUT
OUTFIL FNAMES=TRL,
REMOVECC,NODETAIL,
TRAILER1=(JP1,X,COUNT=(M11,LENGTH=9),X,DATENS=(4MD))
/*
|
For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242
If you don't have the Oct, 2010 PTF installed, ask your System Programmer to install it (it's free). |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|