IDCAMS command DCOLLECT for the dataset name into a file then read the
file.  Divide by about 55k to get the number of tracks used.  Assume
all tracks are full and the partial track would be the error amount.

On Thu, May 14, 2020 at 4:27 PM Lizette Koehler <stars...@mindspring.com> wrote:
>
> Maybe the Catalog Search Function (CSI)  might be able to help.
>
> See it that could be something usable
>
> Lizette
>
>
>
> -----Original Message-----
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
> Seymour J Metz
> Sent: Thursday, May 14, 2020 9:20 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Is there any z/OS API to get byte file size for non-VSAM,
> non-zFS, non-database files?
>
> No, and I'm not even sure what the question means. If what you want is the
> sum of the record lengths then you have to read through the entire file and
> add up the lengths. If you want to know how big it will look to a Unix
> application hen you'll need to add the number of records to account for the
> LF or NL characters, unless the application is reading it as binary. The one
> exception is that if it is a valid FBS dataset then you can calculate the
> size.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
>
> ________________________________________
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of
> Farley, Peter x23353 <peter.far...@broadridge.com>
> Sent: Thursday, May 14, 2020 11:55 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Is there any z/OS API to get byte file size for non-VSAM, non-zFS,
> non-database files?
>
> This question came to me from a co-worker: Is there any API to get the byte
> file size of a non-VSAM, non-zFS, non-database file in z/OS?  I.E., byte
> file size for plain sequential files?
>
> I am aware of the "old way" of reading the VTOC of a volume to get the
> various DSCB's that total up disk extents, but that gets complicated quickly
> for multi-volume files, and was never guaranteed to be accurate as to the
> actual byte count of data in the file except in the RECFM=FS/FBS case
> anyway.
>
> There is always the performance-killing option of just reading the whole
> file and totaling up the length of every record (or block depending on how
> you structure the reads), but no one would call that an API.
>
> As far as I know there is no such API in z/OS, and this is what I told my
> co-worker, but am I wrong?  Is there an alternative of which I am not aware?
>
> TIA for your input.
>
> Peter
> --
>
>
>
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and confidential.
> If the reader of the message is not the intended recipient or an authorized
> representative of the intended recipient, you are hereby notified that any
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, please notify us immediately by e-mail
> and delete the message and any attachments from your system.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email
> to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email
> to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



-- 
Mike A Schwab, Springfield IL USA
Where do Forest Rangers go to get away from it all?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to