My requirement as below.
Space =( cyl , ( 10,10)) Disp= (Lrecl=80)
So how many records (maximum records) can be present in the ps file?
How to find number of records can be present in PS file?
-
- Posts: 10
- Joined: Sat Apr 21, 2012 6:13 pm
- Skillset: cobol,db2,jcl,vsam,cics
- Referer: google
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: How to find number of records can be present in PS file?
depends on the blocksize...
and you want to know only for the primary or for the count for the max alloc primary+all secondary ?
for SDB the blksize in this case will be 27920, which means two records per track 15 tracks per cylinders,
up to You the rest of the math
here is an ISPF/REXX macro that will do the dirty for You
http://ibmmainframes.com/about55037.html
and here is another link with the theory behind
and the same REXX script for the PC Rexx implementation
http://ibmmainframes.com/about35906.html
and you want to know only for the primary or for the count for the max alloc primary+all secondary ?
for SDB the blksize in this case will be 27920, which means two records per track 15 tracks per cylinders,
up to You the rest of the math
here is an ISPF/REXX macro that will do the dirty for You
http://ibmmainframes.com/about55037.html
and here is another link with the theory behind
and the same REXX script for the PC Rexx implementation
http://ibmmainframes.com/about35906.html
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Posts: 10
- Joined: Sat Apr 21, 2012 6:13 pm
- Skillset: cobol,db2,jcl,vsam,cics
- Referer: google
Re: How to find number of records can be present in PS file?
Thanks enrico. I do not have blk size and have only LRECL. I want max alloc primary+sec. here it goes.
10+15*10 = 160
1 cyl = 15 tracks = 160* 15= 2400 tracks
1 track = 2 records = 2400* 2 = 4800 records
The max recoreds 4800 . Correct me if i m wrong.
10+15*10 = 160
1 cyl = 15 tracks = 160* 15= 2400 tracks
1 track = 2 records = 2400* 2 = 4800 records
The max recoreds 4800 . Correct me if i m wrong.
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: How to find number of records can be present in PS file?
No, the two records enrico is talking about are the "blocks" he assumed, at optimal size, that you would be using.
If you use "unblocked" data, you can have many more records than "2" on the track, but you will be doing yourself a big disservice with IO. With enrico's value, a track can be read with two physical reads (deblocking being done in memory). With your unblocked records, that will take... lots longer, you work it out.
Unblocked 80 is a horrible thing to do to DASD....
If you use "unblocked" data, you can have many more records than "2" on the track, but you will be doing yourself a big disservice with IO. With enrico's value, a track can be read with two physical reads (deblocking being done in memory). With your unblocked records, that will take... lots longer, you work it out.
Unblocked 80 is a horrible thing to do to DASD....
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: How to find number of records can be present in PS file?
You are wrong.10+15*10 = 160
1 cyl = 15 tracks = 160* 15= 2400 tracks
1 track = 2 records = 2400* 2 = 4800 records
The max recoreds 4800 . Correct me if i m wrong.
First, as BillyBoyo indicated, the mainframe only writes BLOCKS of data, so your count is off by a factor of over 300. (27920 / 80)
Second, a data set may take up to 5 extents to allocate the primary space and each extent counts against the 16 limit on a volume, so the secondary allocation could be as small as 11 extents.
Third, if the data set is on multiple volumes, you have to calculate the space for EACH volume. And data sets can be allocated on up to 59 volumes, so your calculation could be off by a factor of 59 in addition to being off by another factor of over 300.
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: How to find number of records can be present in PS file?
Hello,
Usually the need is to know how much space some number of records will require. Rarely (if ever) is there a need to determine how many records some amount of space will hold. . .
Why does this matter?So how many records (maximum records) can be present in the ps file?
Usually the need is to know how much space some number of records will require. Rarely (if ever) is there a need to determine how many records some amount of space will hold. . .
Hope this helps,
d.sch.
d.sch.
-
- Posts: 10
- Joined: Sat Apr 21, 2012 6:13 pm
- Skillset: cobol,db2,jcl,vsam,cics
- Referer: google
Re: How to find number of records can be present in PS file?
Okay.Thanks for all ur suggestions. Actually It was asked in the inerview. just want to know it.
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: How to find number of records can be present in PS file?
Hello,
When posting an interview question, you should post in the Interview Questions part of the forum. This topic has been moved.
This topic also had nothing to do with COBOL, so why post in the COBOL part of the forum?
As many of us believed this was a "real" question, time was wasted answering the "wrong thing". If we knew from the beginning this was an interview question, i suspect you would have gotten more useful answers more quickly. . .
When posting an interview question, you should post in the Interview Questions part of the forum. This topic has been moved.
This topic also had nothing to do with COBOL, so why post in the COBOL part of the forum?
As many of us believed this was a "real" question, time was wasted answering the "wrong thing". If we knew from the beginning this was an interview question, i suspect you would have gotten more useful answers more quickly. . .
Hope this helps,
d.sch.
d.sch.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Join parts of two records from same file
by Mickes » Thu Apr 27, 2023 3:47 am » in DFSORT/ICETOOL/ICEGENER - 3
- 1231
-
by sergeyken
View the latest post
Sat Apr 29, 2023 1:32 pm
-
-
- 3
- 6786
-
by sergeyken
View the latest post
Sun May 01, 2022 11:26 pm
-
-
File def'n-problem with different records layouts
by ralph » Tue Oct 26, 2021 10:47 pm » in IBM Cobol - 2
- 1524
-
by ralph
View the latest post
Wed Oct 27, 2021 1:42 am
-
-
-
Split file, SORT then append records.
by Esmayeelhusen » Fri Aug 04, 2023 6:37 pm » in DFSORT/ICETOOL/ICEGENER - 10
- 5412
-
by Esmayeelhusen
View the latest post
Wed Aug 09, 2023 7:39 am
-
-
-
Process file/records until a specific total is reached.
by chillmo » Thu Mar 24, 2022 6:18 am » in Syncsort/Synctool - 12
- 3880
-
by sergeyken
View the latest post
Wed Mar 30, 2022 10:12 pm
-