View previous topic :: View next topic
|
Author |
Message |
gekalpana
New User
Joined: 11 Apr 2007 Posts: 12 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
gekalpana
New User
Joined: 11 Apr 2007 Posts: 12 Location: Chennai
|
|
|
|
Without reading the output file is there any other way ?? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
kalpana,
Quote: |
Without reading the output file is there any other way ?? |
No |
|
Back to top |
|
|
gekalpana
New User
Joined: 11 Apr 2007 Posts: 12 Location: Chennai
|
|
|
|
Ok .. Thanks !! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Yes, good point.
Will the count be in PD or character format ? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Quote: |
Will the count be in PD or character format ? |
Character. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
The "Display the number of input or output records" Smart DFSORT Trick at:
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 |
|
|
|