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
-
- Similar Topics
- Replies
- Views
- Last post
-
-
How to overlay a constant value in PD format
by Shambu » Mon Jun 28, 2021 11:56 pm » in Syncsort/Synctool - 1
- 3494
-
by sergeyken
View the latest post
Tue Jun 29, 2021 1:18 am
-
-
-
COBOL SORT - How to sort entire file first & sort by Key
by k_ekam » Thu Dec 01, 2022 12:58 pm » in IBM Cobol - 3
- 1540
-
by Robert Sample
View the latest post
Wed Dec 07, 2022 7:32 am
-
-
- 4
- 5615
-
by NicC
View the latest post
Mon Oct 19, 2020 1:17 am
-
- 2
- 1442
-
by willy jensen
View the latest post
Fri Aug 13, 2021 8:11 pm
-
- 1
- 1766
-
by prino
View the latest post
Tue Jul 02, 2024 2:23 pm