Page 1 of 1

Icetool utility to change a header file

PostPosted: Sun Aug 17, 2008 4:23 am
by Gayathri_dj
Hi,

I would like to change the cycledate of a header using icetool utility. whenever, I am running the jcl, cols 7 to 14 should be replaced with new cycle date.

Input file 1:
1TRANS20080815 792
1TRANS20080815 792
1TRANS20080815 792
1TRANS20080815 792
1TRANS20080815 792

Input file 2: (Cycle date file)

20080820

Required Output:

1TRANS20080820 792
1TRANS20080820 792
1TRANS20080820 792
1TRANS20080820 792
1TRANS20080820 792

Please let me know how it could be possible.

Re: Icetool utility to change a header file

PostPosted: Mon Aug 18, 2008 9:38 pm
by Frank Yaeger
You can use a DFSORT job like the following to do what you asked for:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *    input file2
20080820
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(C'CYCDATE,''',1,8,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD *    input file 1
1TRANS20080815  792
1TRANS20080815  792
1TRANS20080815  792
1TRANS20080815  792
1TRANS20080815  792
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(7:CYCDATE)
/*