I have two files with one record each. For example:
FIle1:
000000000000000123456000
File2:
0000000000000000000000ABCDEF0000000
I want to overlay file2 with certain positions from file1. File 2 after overlay should be:
00000000000000000000001234560000000
How can i do this with ICETOOL
Thanks
Overlay part of one record with another no keys
-
- Posts: 15
- Joined: Mon Nov 03, 2008 2:04 am
- Skillset: z/OS.CICS,DB2,Linux
- Referer: Internet
- Frank Yaeger
- Global moderator
- Posts: 1079
- Joined: Sat Jun 09, 2007 8:44 pm
- Skillset: DFSORT, ICETOOL, ICEGENER
- Referer: Search
- Contact:
Re: Overlay part of one record with another no keys
I want to overlay file2 with certain positions from file1.
Which positions exactly? (It's certainly not clear from your example.)
What is the RECFM and LRECL of each input file?
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
-
- Posts: 15
- Joined: Mon Nov 03, 2008 2:04 am
- Skillset: z/OS.CICS,DB2,Linux
- Referer: Internet
Re: Overlay part of one record with another no keys
The two files are RECFM=VB, however the source and target parts to be overlayed are in a fixed position.
The ABCDEF in file2 (starting pos 23) is to be overlayed by 123456 (starting pos 16) from file1.
The ABCDEF in file2 (starting pos 23) is to be overlayed by 123456 (starting pos 16) from file1.
- Frank Yaeger
- Global moderator
- Posts: 1079
- Joined: Sat Jun 09, 2007 8:44 pm
- Skillset: DFSORT, ICETOOL, ICEGENER
- Referer: Search
- Contact:
Re: Overlay part of one record with another no keys
Here's a DFSORT job that will do what you asked for. You'll need z/OS DFSORT PTF UK90013 (July, 2008) to use DFSORT's new WHEN=GROUP function. If you don't have that PTF, ask your System Programmer to install it (it's free).
Code: Select all
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file1 (VB)
// DD DSN=... input file2 (VB)
//SORTOUT DD DSN=... output file (VB)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(27:20,6))
OUTFIL STARTREC=2,ENDREC=2
/*
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
- 3500
-
by sergeyken
View the latest post
Tue Jun 29, 2021 1:18 am
-
-
- 5
- 4612
-
by arya_starc
View the latest post
Thu Sep 23, 2021 4:37 pm
-
-
Copy partial record after a string in a record using SORT.
by Esmayeelhusen » Thu May 04, 2023 3:03 pm » in DFSORT/ICETOOL/ICEGENER - 16
- 4249
-
by Esmayeelhusen
View the latest post
Mon May 22, 2023 3:50 pm
-
-
- 5
- 3997
-
by sergeyken
View the latest post
Wed Jun 16, 2021 6:23 pm
-
- 2
- 1397
-
by PRDVCF
View the latest post
Thu Nov 17, 2022 9:58 pm