Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reflecting the file name in output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Reflecting the file name in output file
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 13, 2010 12:49 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 13, 2010 1:06 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 13, 2010 1:49 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 13, 2010 1:58 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us