View previous topic :: View next topic
|
Author |
Message |
satya12
New User
Joined: 25 Apr 2006 Posts: 32 Location: India
|
|
|
|
Hi All,
My requirement is to insert a string "<Page Break>" before each page header in report.Can we do this using ICETOOL?
I can not use rexx as my report has 200,000 lines and i do not want write a COBOL program for this.
Code: |
Input:
-------
1JUL'09, XXXXX Compnay PAGE1
Name Salary
------- -------
AAAA $200
BBBB $100
1JUL'09, XXXXX Compnay PAGE2
Name Salary
------- -------
CCCC $200
DDDD $100
Output:
---------
<Page Break>
1JUL'09, XXXXX Compnay PAGE1
Name Salary
------- -------
AAAA $200
BBBB $100
<Page Break>
1JUL'09, XXXXX Compnay PAGE2
Name Salary
------- -------
CCCC $200
DDDD $100
|
Any help is much appreciated. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use a DFSORT/ICETOOL job like the following to do what you asked for. I assumed your input file has RECFM=FB and LRECL=80 and the page header record can be identified by 'PAGE' in positions 34-37. You can change the job appropriately if those assumptions are incorrect.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/80)
//OUT DD DSN=... output file (FB/80)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=OUT,
IFTHEN=(WHEN=(34,4,CH,EQ,C'PAGE'),
BUILD=(C'<Page Break>',/,1,80))
/*
|
|
|
Back to top |
|
|
satya12
New User
Joined: 25 Apr 2006 Posts: 32 Location: India
|
|
|
|
My file is FBA with 133 record lenght..Anyway i modified your CODE and it worked.
Thanks a lot for the help. |
|
Back to top |
|
|
|