Again, you're giving the right answer to the wrong question. The OP did not ask 
how many tracks were allocated, he asked for the file size in bytes. Since the 
OP hasn't told us why he wants the information, it is presumptuous to presume 
that he should shut up and use something different from what he asked for. 
Several people have asked him to clarify that point, but he hasn't chosen to do 
so.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Gerhard adam [gada...@charter.net]
Sent: Thursday, May 14, 2020 5:04 PM
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?

        Really?  There’s lots that it could do?  So why not just read the DSCB 
for how much is free and do the calculation that has been on every 3390 
Reference card for 30 years
This is done all the time and in a variety of ways.  This problem was readily 
assessed for decades using a subroutine.  This has always been something that 
could readily be done until people start putting language restrictions on it.  
It isn’t that the info isn’t available, it is simply that the information isn’t 
available given the restrictions placed on the problem



        Get Outlook for iOS






On Thu, May 14, 2020 at 1:56 PM -0700, "Charles Mills" <charl...@mcn.org> wrote:










There is lots it could do! Make a decision on "strategy" based on the volume of 
input, for example. Do I process it all or cut off after 'n' records and do 
more on the next run? Do I read the file into an in-memory table and access 
records there, or do I load it into a VSAM file for direct access? Do I invoke 
an external sort or use an internal sort? Or a thousand other things.

It is wrong as @Shmuel points out to preclude questioning the necessity of 
doing something exactly as the OP suggests. It is equally wrong to assume there 
could be no good reason for doing it the OP's way.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Gerhard adam
Sent: Thursday, May 14, 2020 11:52 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?





        It is easy to say that a COBOL program needs to “know” this but it is 
nonsense since there is nothing a COBOL program can do with this info.
If it turns out to really be necessary then a subroutine can be written (as it 
has been done for decades) to provide this information.
If the question is simply to bitch about why z/OS does do this automatically 
via a call or something then the complaint is directed to the wrong group

----------------------------------------------------------------------
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

Reply via email to