Page 1 of 1

Retrieve PHYRECS/TRK without LISTCAT

PostPosted: Mon Apr 18, 2011 9:01 pm
by sensuixel
Hi everyone,

I'm trying to retrieve the space occupied by some VSAM Files in TRACKS.
I could easily retrieve it by running and parsing the result of a LISTCAT.

But I was wondering if it's possible using another method.

- I tried using and parsing DCOLLECT in PL/I but the result aren't exactly the same
==> I retrieve HARBA and DCACISZ but i can't get the equivalent of PHYRECS/TRK, so that my result lacks of precision.
I assumed that the number of Block per Track is equal to round(56 664 / Blksize) but unfortunately it's not always true.

- I tried using IGGCSI via HLASM, and I get the same result

Is there any other way to get the actual number of Block per track

Thanks

Re: Retrieve PHYRECS/TRK without LISTCAT

PostPosted: Mon Apr 18, 2011 9:08 pm
by enrico-sorichetti
I assumed that the number of Block per Track is equal to round(56 664 / Blksize) but unfortunately it's not always true.
You assumed wrongly :D
IGGCSI is a <programmatic> interface to the catalog content so it will not give more than a plain LISTCAT
since I do not feel retyping the whole shebang... see this thread
http://ibmmainframes.com/about35906.html

Re: Retrieve PHYRECS/TRK without LISTCAT

PostPosted: Mon Apr 18, 2011 9:17 pm
by sensuixel
enrico-sorichetti wrote:
I assumed that the number of Block per Track is equal to round(56 664 / Blksize) but unfortunately it's not always true.
You assumed wrongly :D
IGGCSI is a <programmatic> interface to the catalog content so it will not give more than a plain LISTCAT
since I do not feel retyping the whole shebang... see this thread
http://ibmmainframes.com/about35906.html


Thanks for the quick reply ;)

Re: Retrieve PHYRECS/TRK without LISTCAT

PostPosted: Mon Apr 18, 2011 9:41 pm
by steve-myers
The correct way, regardless of access method, to get the number of physical records / track is to use the Assembler TRKCALC macro, which is described here.

Re: Retrieve PHYRECS/TRK without LISTCAT

PostPosted: Mon Apr 18, 2011 11:48 pm
by sensuixel
steve-myers wrote:The correct way, regardless of access method, to get the number of physical records / track is to use the Assembler TRKCALC macro, which is described here.


Thank you really much, I did'nt know this macro, which seems unforgivable given what it can do. :lol:

Re: Retrieve PHYRECS/TRK without LISTCAT

PostPosted: Tue Apr 19, 2011 2:42 pm
by sensuixel
I used the list from http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/am3u1001/B.1.2

I retrieve BLKSIZE from DCOLLECT and compare it with the list to get the number of records per track then
i can calculate the total of tracks on par with the LISCAT.

Now I investigate the TRKCALC macro, thanks you .