Hi,
I have 5 files with different currency codes at different places.
My requirement is to print a report to display the count of different currency codes in files sectioned on files.
So File1:
File2:
Output
One way to do this I could think of is merge these files with a Seq Number in the end and reformat the records so that the currency codes are at same position and create a Temp file. The File number is on 101,2 and Currency Code is on 87,3 like this:
On this file I was using ICETOOL card like this:
The output I am getting is like this:
How do I make the occurs to run inside every section of Display?
Is there any better way to achieve this?
Thanks,
Rajesh
I have 5 files with different currency codes at different places.
My requirement is to print a report to display the count of different currency codes in files sectioned on files.
So File1:
Code:
XXXXGBPXXX
XXXXGBPXX1
XXXXEURXXX
Code:
EURXXXXXXXXXXXX
Output
Code:
File1
GBP 2
EUR 1
File2
EUR 1
One way to do this I could think of is merge these files with a Seq Number in the end and reformat the records so that the currency codes are at same position and create a Temp file. The File number is on 101,2 and Currency Code is on 87,3 like this:
Code:
XXXXXXXXXXXX GBP 01
XXXXXXXXXXXX EUR 01
XXXXXXXXXXXX EUR 02
On this file I was using ICETOOL card like this:
Code:
//TOOLIN DD *
DISPLAY FROM(SORTIN1) LIST(SORTOP1) -
ON(001,102,CH) -
BTITLE('STATS FOR FILE') BREAK(101,002,CH)
OCCUR FROM(SORTIN1) LIST(SORTOP1) -
ON(087,003,CH) ON(VALCNT)
The output I am getting is like this:
Code:
STATS FOR FILE 01
XXXXXXXXXXXX GBP 01
XXXXXXXXXXXX EUR 01
STATS FOR FILE 02
XXXXXXXXXXXX EUR 02
DKK 000000000000002
EUR 000000000000001
How do I make the occurs to run inside every section of Display?
Is there any better way to achieve this?
Thanks,
Rajesh