Page 1 of 1

Overlay part of one record with another no keys

PostPosted: Mon Jan 05, 2009 4:31 pm
by Ron Mascarenhas
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

Re: Overlay part of one record with another no keys

PostPosted: Mon Jan 05, 2009 10:18 pm
by Frank Yaeger
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?

Re: Overlay part of one record with another no keys

PostPosted: Mon Jan 05, 2009 10:57 pm
by Ron Mascarenhas
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.

Re: Overlay part of one record with another no keys

PostPosted: Tue Jan 06, 2009 12:49 am
by Frank Yaeger
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).

//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
/*