Overlay part of one record with another no keys



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Overlay part of one record with another no keys

Postby Ron Mascarenhas » Mon Jan 05, 2009 4:31 pm

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
Ron Mascarenhas
 
Posts: 15
Joined: Mon Nov 03, 2008 2:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: Overlay part of one record with another no keys

Postby Frank Yaeger » Mon Jan 05, 2009 10:18 pm

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
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Overlay part of one record with another no keys

Postby Ron Mascarenhas » Mon Jan 05, 2009 10:57 pm

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.
Ron Mascarenhas
 
Posts: 15
Joined: Mon Nov 03, 2008 2:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: Overlay part of one record with another no keys

Postby Frank Yaeger » Tue Jan 06, 2009 12:49 am

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
/*
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
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post