Page 1 of 2

routine to find byte count of a fixed block file dynamic

PostPosted: Tue Apr 20, 2010 7:56 pm
by mainframe1
hi,
please help to find the routine to get the byte count of a fixed block mainframe dataset
thanks

Re: routije to find byte count of a fixed block file dynamic

PostPosted: Tue Apr 20, 2010 9:25 pm
by Robert Sample
Why do you need useless data? And are you wanting exact byte count (which requires counting records) or the approximate byte count which can be estimated using block count?

Re: routije to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 12:32 am
by dick scherrer
Hello,

How will this byte count be used?

Re: routije to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 5:29 pm
by mainframe1
to get the byte count of fixed block mainframe PS where lrecl > 80

Re: routije to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 6:16 pm
by MrSpock
Number of records X the record length.

Re: routije to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 7:14 pm
by mainframe1
for dynami allocation of files, i have an input files with lrecl 85 and lrecl 40,
the byte count is calcuted as record count*(lrecl+2).
couls u please clarify why its is added 2

Re: routije to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 8:32 pm
by CICS Guy
Re: "routine to find byte count of a fixed block file dynamic"
mainframe1 wrote:for dynami allocation of files, i have an input files with lrecl 85 and lrecl 40...

Fixed block with two lrecls? How do you explain this?

Re: routine to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 8:51 pm
by Robert Sample
for dynami allocation of files, i have an input files with lrecl 85 and lrecl 40,
the byte count is calcuted as record count*(lrecl+2).
couls u please clarify why its is added 2
Since you haven't explained precisely what you are doing, the platform you are doing it on, nor pretty much anything, there's no way we can tell you the answer. Who (or what) calculated the byte count?

Re: routine to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 9:29 pm
by mainframe1
robert,
iam trtying to dynamically allocate a byte count and record count file for a 2 input files.
theinput files with lrecl 85 and lrecl 40,
the byte count is calcuted as record count*(lrecl+2). as pre-defined in the code
iam getting the byte count +2 fro input file whose lrecl <80 and correct byte count for lrecl>80
couls u please clarify why its is added 2

Re: routine to find byte count of a fixed block file dynamic

PostPosted: Wed Apr 21, 2010 9:46 pm
by CICS Guy
mainframe1 wrote:the byte count is calcuted as record count*(lrecl+2). as pre-defined in the code
Pre-defined by whom?
iam getting the byte count +2 fro input file whose lrecl <80 and correct byte count for lrecl>80
couls u please clarify why its is added 2
The byte count +2 I can understand, but the correct byte count for the larger lrecl is not understandable. How many records in the 40 byte file and how many records in the 85 byte file?