View previous topic :: View next topic
|
Author |
Message |
Anshuman_Hyd
New User
Joined: 13 Jan 2010 Posts: 15 Location: Hyd
|
|
|
|
Hi ! Suppose i want to count the no. of records in 5 files individually.And the output should show me as
" <File name> no. of records = <No of records> "
Count can be done thru icetool utility just want to know how can we refect the file name in the output file.it should be dynamic as there are 5 different files.and need to do individually.
Please let me know if any concerns. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Can't be done. Once the JCL has been interpretted it is set in stone, unchangeable, fixed forever.
The only way to possibly do this is by submitting a batch job from the sort step that counts the data and then to copy the data, but two passes of the data to achieve this does seem rather a waste of resource.
Of course we get back to the original problem, if record counts are required they should be generated at the same time as the file is generated to stop this waste of time and resource required to perform record counting. |
|
Back to top |
|
|
Anshuman_Hyd
New User
Joined: 13 Jan 2010 Posts: 15 Location: Hyd
|
|
|
|
If we set the data in a parms and using that parms can we do it.like
//CTRCDS EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SORTIN DD DSN=A*****.&DB..&N..DATA.G0009V00,DISP=SHR
//SORTOUT DD DSN=A*****.OUTPUT.REPORT,DISP=MOD
//TOOLIN DD DSN=A*****.OUTPUT.TOOLIN,DISP=OLD
//SYSTSIN DD DSN=A*****.KIRTI.PDS(ZDB2UNL1),DISP=SHR
//SYSIN DD DSN=&&TEMP,DISP=(OLD,DELETE,DELETE)
// PEND
//MYSTART EXEC PGM=IEFBR14
//S05 EXEC MY,DB=D2DGSIA,N=IMPLCONS,T='GSI_APPL_IMPL_CONS'
//S06 EXEC MY,DB=D2DGSIA,N=ASERVOPR,T='GSI_APPL_SERV_OPER'
//S07 EXEC MY,DB=D2DGSIA,N=APPLTION,T='GSI_APPLICATION'
//S08 EXEC MY,DB=D2DGSIA,N=CCONHIER,T='GSI_CONS_CONS_HIER'
Where as TOOLIN consists of
COUNT FROM(SORTIN) WRITE(SORTOUT) TEXT('COUNT OF RECORDS IS ')-
DIGITS(8)
So for each of the individual table file i want to hv the count.So please guide me how can i do it. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What are you actually asking here. It is not completely clear.
Do you want the output file to be named differently with a count indicator in it, or do you want a report with the dataset name and the record count. |
|
Back to top |
|
|
Anshuman_Hyd
New User
Joined: 13 Jan 2010 Posts: 15 Location: Hyd
|
|
|
|
I want a report with the dataset name and the record count.I know the procedure of getting the count but don't know how can we have the dataset name in the report.We don't need to hard code the dataset name we want it to be taken dynamically from the parameters provided to it. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Are you using DFSORT, SYNCSORT, or CA-SORT ?
I will move the topic to the appropriate forum on your reply. |
|
Back to top |
|
|
Anshuman_Hyd
New User
Joined: 13 Jan 2010 Posts: 15 Location: Hyd
|
|
|
|
No we are not using any of these.Can it be done by SYNCSORT? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I am pretty sure that this has been asked and answered in the DFSORT forum before, but of course depending on your sort product ......
If you are not sure, then by running a simple sort step shown below, you will be able to find out.
If the messages start with ICE then your product is DFSORT and the topic will be moved. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and the topic will remain in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Code: |
//SORTSTEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY |
|
|
Back to top |
|
|
Subhu_Chatterbox
New User
Joined: 25 Feb 2010 Posts: 12 Location: Hyd
|
|
|
|
Hi I work with Anshuman,in our office SYNCSORT is used.
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
We have passed the DB name and table name through proc, and placed the icetool step inside that.
Now the count is working fine. But we need to show the output with database and table name. Please help.
Currently the report file is populating like:
COUNT OF RECORDS IS 0000500
and we need it like along with DB and table name.We are having DB and Table name both in DD DSN and PROC.
S05 EXEC MY,DB=D2DGSIA,N=IMPLCONS,T='GSI_APPL_IMPL_CONS'
MY is our proc name.
Thanks in advance!!!! |
|
Back to top |
|
|
|