|
View previous topic :: View next topic
|
| Author |
Message |
Nethraa
New User
Joined: 02 Feb 2010 Posts: 16 Location: chennai
|
|
|
|
Hi all,
Using Easytrieve i have created one report. Using this Report i need to create the Outfile report as follows. Is that possible using ICETOOL.
RECFM : FBA and LRECL = 80.
Input file Report :
| Code: |
1REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B1
-
TABLE START END
BANK IND DATE DATE
0 B1 AA38 B1MR10080 000 07/01/00 04/31/10
AA38 B1MR10085 001 07/28/03 04/31/10
AA38 B1MR10090 002 11/01/01 04/31/10
BB46 B1MR10095 003 11/29/00 04/31/10
BB46 B1MC10010 10/21/99 05/11/10
1REPORT-01 BANK TABLE EXPIRATION DATE
TITL2: B2
-
TABLE START END
BANK IND DATE DATE
B2 AA38 B2MR10080 05/23/08 03/10/10
AA38 B2MR10085 04/29/12 03/12/10
BB46 B2MR10090 04/29/12 04/10/10 |
The Input report is Bankwise Break. In that AA38 and BB46 are the tables.
I have created the Input report using Easytrieve and I need to create the Output file which should summarise as the Table name and the Occurance of the table as follows. I couldn't create this report using Easytriev itself.
Hence asking whether it is possible to create using ICETOOL.
Outfile Report format :
| Code: |
1REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B1
-
TABLE START END
BANK IND DATE DATE
0 B1 AA38 B1MR10080 000 07/01/00 04/31/10
AA38 B1MR10085 001 07/28/03 04/31/10
AA38 B1MR10090 002 11/01/01 04/31/10
BB46 B1MR10095 003 11/29/00 04/31/10
BB46 B1MC10010 10/21/99 05/11/10
BANK SUMMARY SUMMARY TOTALS
------------ --------------
AA38 3
BB46 2
1REPORT-01 BANK TABLE EXPIRATION DATE
TITL2: B2
-
TABLE START END
BANK IND DATE DATE
B2 AA38 B2MR10080 05/23/08 03/10/10
AA38 B2MR10085 04/29/12 03/12/10
BB46 B2MR10090 04/29/12 04/10/10
BANK SUMMARY SUMMARY TOTALS
------------ --------------
AA38 2
BB46 1 |
Could you please help me to resolve this. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Is there some reason you did not generate the summary in the same program?
Why would adding another process be desirable? |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
nethraa,
The following DFSORT JCL will give you the desired results
| Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Your FBA 80 byte input file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(89:2C'0')),
IFTHEN=(WHEN=GROUP,BEGIN=(2,9,CH,EQ,C'REPORT-01'),PUSH=(81:ID=8)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'AA38'),OVERLAY=(89:C'1')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'BB46'),OVERLAY=(90:C'1'))
OUTFIL REMOVECC,BUILD=(1,80),
SECTIONS=(81,8,
TRAILER3=(/,4:C'BANK SUMMARY SUMMARY TOTALS',/,
4:C'------------ --------------',/,
2:C'AA38',24:TOT=(89,1,ZD,M10,LENGTH=8),/,
2:C'BB46',24:TOT=(90,1,ZD,M10,LENGTH=8),/,
80:X))
//* |
|
|
| Back to top |
|
 |
Nethraa
New User
Joined: 02 Feb 2010 Posts: 16 Location: chennai
|
|
|
|
Hi Skolusu,
Thank you so much for your Input. It got worked for me.
Hi Dick,
While trying to create using Easytrieve i couldn't get the report properly.
That is why thought of doing it using ICETOOL. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| While trying to create using Easytrieve i couldn't get the report properly. |
Suggest that spending some more time learning more about Easytrieve would be a good investment of your time as it is already "standard" on your system. Also, once learned, it would be in your "tool kit" forever. . .
Not taking time to learn (or ask for Easytrieve help) and asking someone else to write the code is probably not the direction you want to follow. . .
Addiing additional processes that have to be maintained is probably not something your management would recommend either.
And then there is the potential of wasted system resources. . . What if there were hundreds of millions of records. . . |
|
| Back to top |
|
 |
Nethraa
New User
Joined: 02 Feb 2010 Posts: 16 Location: chennai
|
|
|
|
Hi Skolusu,
I need to get the final total like below.
| Code: |
1REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B1
-
TABLE START END
BANK IND DATE DATE
0 B1 AA38 CB 000 07/01/00 04/31/10
AA38 CB 001 07/28/03 04/31/10
AA38 CB 002 11/01/01 04/31/10
BB46 CB 003 11/29/00 04/31/10
BB46 CB 004 12/31/09 04/31/10
BANK SUMMARY SUMMARY TOTALS
--------------- --------------
AA38 3
BB46 2
TOTAL FOR CORP: 5
1REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B2
-
TABLE START END
BANK IND DATE DATE
0 B2 AA38 CFMR10080 05/23/08 03/10/10
BB46 CFMR10080 05/23/08 03/10/10
BANK SUMMARY SUMMARY TOTALS
--------------- --------------
AA38 1
BB46 1
TOTAL FOR CORP: 2 |
For that i just modified your code as follows.
| Code: |
OUTFIL REMOVECC,BUILD=(1,80),
SECTIONS=(81,8,
TRAILER3=(/,4:C'CORP SUMMARY TABLES TOTAL',/,
4:C'--------------- --------------',/,
2:C'AA38',24:TOT=(89,1,ZD,M10,LENGTH=8),/,
2:C'BB46',24:TOT=(90,1,ZD,M10,LENGTH=8),/,
/,4:C'TOTAL FOR CORP:',
24:TOT=(89,1,90,1,UFF,M10,LENGTH=8),/,
80:X)) |
I know i am doing some mistake in summing the Fields.
could you please help me to resolve this. |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Nethraa,
You canNOT add 2 fields horizontally on the trailer parm. Use the following DFSORT control cards which will give you the desired results
| Code: |
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(89:3C'0')),
IFTHEN=(WHEN=GROUP,BEGIN=(2,9,CH,EQ,C'REPORT-01'),PUSH=(81:ID=8)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'AA38'),OVERLAY=(89:C'101')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'BB46'),OVERLAY=(89:C'011'))
OUTFIL REMOVECC,BUILD=(1,80),
SECTIONS=(81,8,
TRAILER3=(/,4:C'BANK SUMMARY SUMMARY TOTALS',/,
4:C'------------ --------------',/,
2:C'AA38',24:TOT=(89,1,ZD,M10,LENGTH=8),/,
2:C'BB46',24:TOT=(90,1,ZD,M10,LENGTH=8),/,
80:X)),
TRAILER1=(/,4:C'TOTAL FOR CORP : ',TOT=(91,1,ZD,M10,LENGTH=8))
//* |
|
|
| Back to top |
|
 |
Nethraa
New User
Joined: 02 Feb 2010 Posts: 16 Location: chennai
|
|
|
|
Hi Skolusu,
Thank you so much. It got worked.
Hi Dick,
As per your advice i will try to create with Easytrieve as well. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
| Quote: |
| As per your advice i will try to create with Easytrieve as well. |
Cool. Good luck.
d |
|
| Back to top |
|
 |
Nethraa
New User
Joined: 02 Feb 2010 Posts: 16 Location: chennai
|
|
|
|
Hi,
I got one more modification in this requirement. I need to add one Blank line if there is a change in the Table Ind. Means that in the below report i am having AA38 and BB46 as table ind. As soon as AA38 details are written into the report one blank link should come and then BB46 detail records should be written. Is that possible to do using DFSORT.
| Code: |
REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B1
-
TABLE START END
BANK IND DATE DATE
0 B1 AA38 CB 000 07/01/00 04/31/10
AA38 CB 001 07/28/03 04/31/10
AA38 CB 002 11/01/01 04/31/10
BB46 CB 003 11/29/00 04/31/10
BB46 CB 004 12/31/09 04/31/10
BANK SUMMARY SUMMARY TOTALS
--------------- --------------
AA38 3
BB46 2
TOTAL FOR CORP: 5
1REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B2
-
TABLE START END
BANK IND DATE DATE
0 B2 AA38 CFMR10080 05/23/08 03/10/10
BB46 CFMR10080 05/23/08 03/10/10
BANK SUMMARY SUMMARY TOTALS
--------------- --------------
AA38 1
BB46 1
TOTAL FOR CORP: 2 |
Please help me to resolve this issue. |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Nethraa,
Use the following control cards which will give you the desired results
| Code: |
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(89:3C'0')),
IFTHEN=(WHEN=GROUP,BEGIN=(2,9,CH,EQ,C'REPORT-01'),PUSH=(81:ID=8)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'AA38'),OVERLAY=(89:C'101')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'BB46'),OVERLAY=(89:C'011'))
OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(9,4,CH,EQ,C'AA38'),
END=(9,4,CH,EQ,C'BB46'),PUSH=(92:9,4))
OUTFIL REMOVECC,IFOUTLEN=80,
IFTHEN=(WHEN=(9,4,CH,EQ,C'BB46',AND,92,4,CH,EQ,C'AA38'),
BUILD=(80X,/,1,80)),
SECTIONS=(81,8,
TRAILER3=(/,4:C'BANK SUMMARY SUMMARY TOTALS',/,
4:C'------------ --------------',/,
2:C'AA38',24:TOT=(89,1,ZD,M10,LENGTH=8),/,
2:C'BB46',24:TOT=(90,1,ZD,M10,LENGTH=8),/,
80:X)),
TRAILER1=(/,4:C'TOTAL FOR CORP : ',TOT=(91,1,ZD,M10,LENGTH=8))
//* |
|
|
| Back to top |
|
 |
Nethraa
New User
Joined: 02 Feb 2010 Posts: 16 Location: chennai
|
|
|
|
Hi Skolusu,
Thank you so much for the quick reply. But i didn't get the Ouput as expected. Actually the number of Table indicators are increased and the lenght also changed to 133 FBA format. Hence i modified the code accordingly. Herewith i am attaching the Code and the Expected Results.
The Modified Code :
| Code: |
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(142:8C'0')),
IFTHEN=(WHEN=GROUP,BEGIN=(2,9,CH,EQ,C'REPORT-01'),PUSH=(134:ID=8)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'AA38'),OVERLAY=(142:C'10000001')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'BB46'),OVERLAY=(142:C'01000001')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'CC11'),OVERLAY=(142:C'00100001')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'DD28'),OVERLAY=(142:C'00010001')),
IFTHEN=(WHEN=(9,4,CH,EQ,C,EE22'),OVERLAY=(142:C'00001001')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'FF55'),OVERLAY=(142:C'00000101')),
IFTHEN=(WHEN=(9,4,CH,EQ,C'GG77'),OVERLAY=(142:C'00000011'))
OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(9,4,CH,EQ,C'AA38',OR,
9,4,CH,EQ,C'BB46',OR,9,4,CH,EQ,C'CC11',OR,
9,4,CH,EQ,C'DD28',OR,9,4,CH,EQ,C'EE22',OR,
9,4,CH,EQ,C'FF55'),
END=(9,4,CH,EQ,C'GG77'),PUSH=(150:9,4))
OUTFIL REMOVECC,IFOUTLEN=133,
IFTHEN=(WHEN=(9,4,CH,EQ,C'AA38',AND,9,4,CH,EQ,C'BB46',AND,
9,4,CH,EQ,C'CC11',AND,9,4,CH,EQ,C'DD28',AND,
9,4,CH,EQ,C'EE22',AND,9,4,CH,EQ,C'FF55',AND,
9,4,CH,EQ,C'GG77'),
BUILD=(133X,/,1,133)),
SECTIONS=(134,8,
TRAILER3=(/,4:C'CORP SUMMARY SUMMARY TOTALS',/,
4:C'--------------- --------------',/,
2:C'AA38',24:TOT=(142,1,ZD,M10,LENGTH=8),/,
2:C'BB46',24:TOT=(143,1,ZD,M10,LENGTH=8),/,
2:C'CC11',24:TOT=(144,1,ZD,M10,LENGTH=8),/,
2:C'DD28',24:TOT=(145,1,ZD,M10,LENGTH=8),/,
2:C'EE22',24:TOT=(146,1,ZD,M10,LENGTH=8),/,
2:C'FF55',24:TOT=(147,1,ZD,M10,LENGTH=8),/,
2:C'GG77',24:TOT=(148,1,ZD,M10,LENGTH=8),/,
/,4:C'TOTAL FOR CORP : ',TOT=(149,1,ZD,M10,LENGTH=8),/,
133:X)) |
Expected Result:
| Code: |
REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B1
-
TABLE START END
BANK IND DATE DATE
0 B1 AA38 CB 000 07/01/00 04/31/10
AA38 CB 001 07/28/03 04/31/10
AA38 CB 002 11/01/01 04/31/10
BB46 CB 003 11/29/00 04/31/10
BB46 CB 004 12/31/09 04/31/10
CC11 003 11/22/00 04/31/10
CC11 004 12/22/09 04/31/10
DD28 004 12/22/09 04/31/10
DD28 004 12/22/09 04/31/10
EE22 003 06/29/00 04/31/10
EE22 004 06/22/09 04/31/10
FF55 003 09/11/00 04/31/10
GG77 003 08/12/00 04/31/10
BANK SUMMARY SUMMARY TOTALS
--------------- --------------
AA38 3
BB46 2
CC11 2
DD28 2
EE22 2
FF55 1
GG77 1
TOTAL FOR CORP : 13
1REPORT-01 BANK TABLE EXPIRATION DATES
TITL2: B2
-
TABLE START END
BANK IND DATE DATE
0 B2 AA38 CFMR10080 05/11/04 03/10/10
AA38 CFMR10080 06/08/05 03/10/10
AA38 CFMR10080 07/06/09 03/10/10
AA38 CFMR10080 08/12/08 03/10/10
AA38 CFMR10080 09/13/08 03/10/10
BB46 CFMR10080 05/23/08 03/10/10
BB46 CFMR10080 05/23/02 03/10/10
GG77 CFMR10080 10/23/01 03/10/10
BANK SUMMARY SUMMARY TOTALS
--------------- --------------
AA38 5
BB46 2
CC11 0
DD28 0
EE22 0
FF55 0
GG77 1
TOTAL FOR CORP: 8 |
Somewhere i am doing mistake. Please help me to resolve this issue. |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
| Nethraa wrote: |
| Thank you so much for the quick reply. But i didn't get the Ouput as expected. Actually the number of Table indicators are increased and the lenght also changed to 133 FBA format. |
Nethraa,
The given jobs works according to the input you provided. I just can't read your mind or look at your data. If you knew the specifications have changed you should have mentioned it before and it would save a lot of my time as well as your time. I can't keep working on 'n' different scenarios.
Here is the updated code which would give you the desired results
| Code: |
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(142:8C'0')),
IFTHEN=(WHEN=GROUP,BEGIN=(2,9,CH,EQ,C'REPORT-01'),PUSH=(134:ID=8)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'AA38'),OVERLAY=(142:C'1',149:C'1',9,4)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'BB46'),OVERLAY=(143:C'1',149:C'1',9,4)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'CC11'),OVERLAY=(144:C'1',149:C'1',9,4)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'DD28'),OVERLAY=(145:C'1',149:C'1',9,4)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'EE22'),OVERLAY=(146:C'1',149:C'1',9,4)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'FF55'),OVERLAY=(147:C'1',149:C'1',9,4)),
IFTHEN=(WHEN=(9,4,CH,EQ,C'GG77'),OVERLAY=(148:C'1',149:C'1',9,4))
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(158:SEQNUM,8,ZD,RESTART=(150,4))),
IFTHEN=(WHEN=GROUP,BEGIN=(150,4,CH,EQ,C'AA38'),PUSH=(154:150,4))
OUTFIL REMOVECC,IFOUTLEN=133,
IFTHEN=(WHEN=(150,1,CH,GT,C' ',AND,154,4,CH,EQ,C'AA38',AND,
158,8,ZD,EQ,1),
BUILD=(133X,/,1,133)),
SECTIONS=(134,8,
TRAILER3=(/,4:C'BANK SUMMARY SUMMARY TOTALS',/,
4:C'------------ --------------',/,
4:C'AA38',24:TOT=(142,1,ZD,M10,LENGTH=8),/,
4:C'BB46',24:TOT=(143,1,ZD,M10,LENGTH=8),/,
4:C'CC11',24:TOT=(144,1,ZD,M10,LENGTH=8),/,
4:C'DD28',24:TOT=(145,1,ZD,M10,LENGTH=8),/,
4:C'EE22',24:TOT=(146,1,ZD,M10,LENGTH=8),/,
4:C'FF55',24:TOT=(147,1,ZD,M10,LENGTH=8),/,
4:C'GG77',24:TOT=(148,1,ZD,M10,LENGTH=8),/,/,
4:C'TOTAL FOR CORP : ',3X,TOT=(149,1,ZD,M10,LENGTH=8),/,
133:X))
//* |
|
|
| Back to top |
|
 |
Nethraa
New User
Joined: 02 Feb 2010 Posts: 16 Location: chennai
|
|
|
|
Hi Skolusu,
First of all i am really sorry as i took your valuable time. But Even i don't know before about the requirement change. As they asked me to change the record length i tried the code as i mentioned.
Thank you for the reply. It got worked. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|