View previous topic :: View next topic |
Author |
Message |
mfuser Banned
Joined: 01 Mar 2005 Posts: 105 Topics: 58
|
Posted: Tue Dec 13, 2005 2:31 am Post subject: need to add a new line to the report using ICETOOL |
|
|
Hai All,
I have a requirement in which i am using ICETOOL in one of the step in JCL and there is a report which is being generated as a new dataset.The report looks like this :
Code: |
SUMMARY Data Set Report - 1 - 12/13/05 14:00:00
EMPNAME MARKS
--------------- -------------
SHEKAR 30
KUMAR 45
MAHESH 56
NARESH 65
RAMYA 34
TOTAL MARKS 230
|
I need to add a new line called 'FINISH' at the end of report and that should be starting from 41 st column and should end at 46 th column and i am expecting my report to look like
Code: |
SUMMARY Data Set Report - 1 - 12/13/05 14:00:00
EMPNAME MARKS
--------------- -------------
SHEKAR 30
KUMAR 45
MAHESH 56
NARESH 65
RAMYA 34
TOTAL MARKS 230
FINISH
|
Can anybody assit me how do i add the new line with the requirement specified above using ICETOOL ?
What should be my changes in //TOOLIN DD * control statement ? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Dec 13, 2005 6:12 am Post subject: |
|
|
mfuser,
try this
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input dsn,
// DISP=OLD
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL TRAILER1=(41:'FINISH)
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
mfuser Banned
Joined: 01 Mar 2005 Posts: 105 Topics: 58
|
Posted: Tue Dec 13, 2005 6:28 am Post subject: |
|
|
Kolusu,
Thanks for your early response.Kolusu in my JCL step i am using
Code: |
//STEP0001 EXEC PGM=ICETOOL
|
and i am sorting from one input dataset to another new dataset using CNTL dataset and i am using occurs from new dataset to list (dataset)
as well as displaying from list(dataset) to another list(dataset)
I have understood what exactly you meant while using SORT with OUTFIL TRAILER1 option but how can we use it in ICETOOL and my //TOOLIN DD * looks like
Code: |
//TOOLIN DD *
SORT FROM(ABC) TO(XYZ) USING(CNTL)
OCCURS FROM(XYZ) LIST(LIST1) -
DISLAY FROM(LIST1) LIST(LIST2) -
TITLE('SUMMARY Data Set Report ') -
DATE TIME -
HEADER('EMPNAME ') -
HEADER('MARKS') -
TOTAL('TOTAL MARKS')
|
Please let me know how can the requirement can be achieved . |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Dec 13, 2005 6:32 am Post subject: |
|
|
mfuser,
You really don't need to use 2 passes to achieve the desired results. show me a sample input and desired output along with the DB properties and I will show you how to do it.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
mfuser Banned
Joined: 01 Mar 2005 Posts: 105 Topics: 58
|
Posted: Tue Dec 13, 2005 6:48 am Post subject: |
|
|
Kolusu,
I am basically not able to figure out what exactly you mean but my requirement is only to add a new line at the end of report using ICETOOL at a particular column in the //TOOLIN DD * control statement. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Dec 13, 2005 8:46 am Post subject: |
|
|
mfuser,
I have NO idea as to what you are trying to do. As I said earlier, you don't require 2 passes of data to create the report. Here is an example. check this
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
SHEKAR 30
KUMAR 45
MAHESH 56
NARESH 65
RAMYA 34
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,10,CH,A)
OUTREC FIELDS=(3:1,15,41:15,5,80:X)
OUTFIL HEADER1=(25:'SUMMARY DATA SET REPORT ',&DATE,X,&TIME,2/),
HEADER2=(3:'EMPNAME ',40:' MARKS',/,
3:'========',40:'======'),
TRAILER1=(38:'========',/,
10:'TOTAL MARKS:',38:TOT=(41,5,ZD,EDIT=(TTTTTTTT)),2/,
41:'FINISH')
/*
|
The report is generated as follows
Code: |
SUMMARY DATA SET REPORT 12/13/05 08:42:05
EMPNAME MARKS
======== ======
KUMAR 45
MAHESH 56
NARESH 65
RAMYA 34
SHEKAR 30
========
TOTAL MARKS: 00000230
FINISH
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Tue Dec 13, 2005 11:25 am Post subject: |
|
|
If you want to use ICETOOL instead of OUTFIL to generate the report, I would guess that you don't need SORT, OCCURS and DISPLAY either. You can probably generate the report with just OCCURS and then use a COPY to add the one line to the DFSORT/ICETOOL report. But I'm just guessing since you didn't post your complete JCL. If you want me to help you do this with ICETOOL, please post your complete DFSORT/ICETOOL job with all of the JCL and control statements. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
|
|
|