IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reflecting the file name in output file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Tue Apr 13, 2010 12:42 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 12:49 pm
Reply with quote

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
View user's profile Send private message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Tue Apr 13, 2010 1:00 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 1:06 pm
Reply with quote

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
View user's profile Send private message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Tue Apr 13, 2010 1:42 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 1:49 pm
Reply with quote

Are you using DFSORT, SYNCSORT, or CA-SORT ?

I will move the topic to the appropriate forum on your reply.
Back to top
View user's profile Send private message
Anshuman_Hyd

New User


Joined: 13 Jan 2010
Posts: 15
Location: Hyd

PostPosted: Tue Apr 13, 2010 1:53 pm
Reply with quote

No we are not using any of these.Can it be done by SYNCSORT?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 1:58 pm
Reply with quote

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
View user's profile Send private message
Subhu_Chatterbox

New User


Joined: 25 Feb 2010
Posts: 12
Location: Hyd

PostPosted: Tue Apr 13, 2010 6:30 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top