View previous topic :: View next topic
|
Author |
Message |
Shaile
New User
Joined: 28 May 2009 Posts: 4 Location: Chennai
|
|
|
|
Hi,
I have a COBOL program in JCL, let say STEP01. In this program I do not have logic to count the number of records. Now, is there a way I can get the count anywere from the Job in Spool e.g. Can I get the count from SYSOUT, SYSMSG or any where else from the JCL. I wonder if the record count is stored anywhere by defalut by MVS or OS (just a guess).
Thanks,
Shailendra |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
In this program I do not have logic to count the number of records |
Include the logic to count the number of records. |
|
Back to top |
|
|
Shaile
New User
Joined: 28 May 2009 Posts: 4 Location: Chennai
|
|
|
|
Hi Arun,
Thanks for quick reply.
I can not change the program now. Nor I can add any SORT or File-Aid step to get the count. All I have is Job in spool. I have to get the count which is used as input/output in that cobol program. Can you suggest something else?
Thanks,
Shailendra |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, so you are not allowed to change anything. Therefor you can not achieve the requirement.
Who on earth makes up these darn stupid requirements |
|
Back to top |
|
|
Shaile
New User
Joined: 28 May 2009 Posts: 4 Location: Chennai
|
|
|
|
Hi Expat,
The program was made long time and we do not have source module with us. We are using only the load module. The file is so big we can not add another step like SORT or File-Aid as it will increase CPU time.
I wanted to know would the record count would be strored anywhere in MVS or OS like it keep in case of SORT and File-Aid. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Are you talking about record count of an input file, or count of spooled lines -- I assume you're talking about an input file but you keep mentioning the job is spooled.
z/OS does not maintain a record count for a file anywhere that I'm aware of. If the file is sequential, you can approximate the record count by finding the number of blocks (assuming that's the allocation unit) and multiplying by the records per block. That is approximate because the last block may not be a full block, so your count could differ from the actual number of records in the file by almost a full block's worth of records. If the file is not sequential, you may be able to approximate the record count depending upon the type of file it is. |
|
Back to top |
|
|
Shaile
New User
Joined: 28 May 2009 Posts: 4 Location: Chennai
|
|
|
|
Thanks Robert, it helps. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
The file is so big we can not add another step like SORT or File-Aid as it will increase CPU time |
Shaile,
Did you try this already? If you're looking for an exact count, may be you'll have to add a sort step to do this. How big is your file? What's the RECFM/LRECL? |
|
Back to top |
|
|
Itanium
Active User
Joined: 22 Jan 2006 Posts: 114 Location: India
|
|
|
|
Shaile wrote: |
Hi Expat,
The program was made long time and we do not have source module with us. We are using only the load module. The file is so big we can not add another step like SORT or File-Aid as it will increase CPU time.
I wanted to know would the record count would be strored anywhere in MVS or OS like it keep in case of SORT and File-Aid. |
no gain without any pain. you might have to add a step to identify the exact record count.
Else check if any other jobs using the same dataset and see the possibility of getting the record count there. Make sure the dataset is not altered midway. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why is there a requirement at this late date to have a record count of this input file? What decisions might be made knowing this?
Is this file on dasd or "tape". If it is on dasd you can get close using the dcb info and the space allocated. If it is on tape, the tape management system will probably know the data volume. |
|
Back to top |
|
|
|