Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Pass the count of records to the next step of Jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Thu Apr 26, 2007 12:29 pm    Post subject: Pass the count of records to the next step of Jcl
Reply with quote

Hi
I want to get the count of records present in a sequential file and pass it to the next step in the jcl .. is that possible ..?? If yes , please let me know how to achieve that ??

Thanks !!
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8619
Location: Back in jolly old England

PostPosted: Thu Apr 26, 2007 12:32 pm    Post subject:
Reply with quote

You can use SORT, ICETOOL, IEBGENER to get a count of records, then you need to read the output to get the record count, and write it out.
Back to top
View user's profile Send private message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Thu Apr 26, 2007 12:54 pm    Post subject: Re: Pass the count of records to the next step of Jcl
Reply with quote

Without reading the output file is there any other way ??
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Apr 26, 2007 12:58 pm    Post subject:
Reply with quote

kalpana,
Quote:
Without reading the output file is there any other way ??

No
Back to top
View user's profile Send private message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Thu Apr 26, 2007 1:00 pm    Post subject: Re: Pass the count of records to the next step of Jcl
Reply with quote

Ok .. Thanks !!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8619
Location: Back in jolly old England

PostPosted: Thu Apr 26, 2007 1:11 pm    Post subject:
Reply with quote

By output I meant the SYSOUT DD statement from DFSORT, or SYSPRINT from IEBGENER.

There is no need to actually copy the data with SORT / IEBGENER, you can use DD DUMMY for the SORTOUT / SYSUT2 statement.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Apr 26, 2007 1:31 pm    Post subject:
Reply with quote

Expat,

Actually you can get the record count only (not the data) into a file flat (not sysout) using DFSORT Trailer option. As Kalpana wanted to pass the record count to next step I guess this option is best (as sysout contains other data also and needs to be filtered for the count).
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8619
Location: Back in jolly old England

PostPosted: Thu Apr 26, 2007 1:39 pm    Post subject:
Reply with quote

Yes, good point.
Will the count be in PD or character format ?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Apr 26, 2007 2:11 pm    Post subject:
Reply with quote

Quote:
Will the count be in PD or character format ?

Character.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Apr 26, 2007 9:26 pm    Post subject:
Reply with quote

The "Display the number of input or output records" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

shows how to use TRAILER1 to get one record with the count. The example gets the count as a ZD/CH value, but it can easily be changed to get the count as a PD value by using:

Code:

   ...
   TRAILER1=(COUNT=(TO=PD,LENGTH=8))
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Matching and unmatched records!! Vignesh Sid SYNCSORT 3 Thu Nov 09, 2017 11:22 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us