i have 2 files of input length 80.
first file has 09-11-2007 and second file has 03-27-2005.. In output i want the 2nd file as 03-11-2005.
How can i do it using sort with overlay parameter?
How can i do it using sort with overlay parameter
-
- Posts: 5
- Joined: Thu Sep 06, 2007 3:40 pm
- Skillset: COBOL, JCL, CICS, EZtrieve
- Referer: friends
Re: How can i do it using sort with overlay parameter
I'd bet that between the last example and a sort manual, you could probably work this one out on your own..... 

- Frank Yaeger
- Global moderator
- Posts: 1079
- Joined: Sat Jun 09, 2007 8:44 pm
- Skillset: DFSORT, ICETOOL, ICEGENER
- Referer: Search
- Contact:
Re: How can i do it using sort with overlay parameter
Indranil28,
Here's a DFSORT job that will do what you asked for:
Here's a DFSORT job that will do what you asked for:
Code: Select all
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
09-11-2007
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
* Create DFSORT symbol as follows:
* F1,'dd'
* where dd is the day from the file1 record
INREC BUILD=(C'F1,''',4,2,C'''',80:X)
/*
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD *
03-27-2005
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
* Use F1 symbol to overlay dd in the file2 record
INREC OVERLAY=(4:F1)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort