Page 1 of 1

A methode for dataset allocation.

PostPosted: Tue Oct 09, 2012 12:44 am
by Mehdi shri
Dear friends.
I want to allocate a QSAM. It has 240 byte lenght. It may be contain 999000 records in the future.Is there a rule or a calculation methode to estimate and specifying this dataset allocation parameters.(999000 record by 240 byte lenght)
How I can estimate and specifying the following parameters?
Space units . . . . .   
                                     
 Average record unit                 
 Primary quantity  . . 
 Secondary quantity 
 Directory blocks  . . 
 Record format . . . . 
 Record length . . . . 
 Block size  . . . . .     
 Data set name type 
                 

And I ask same question for a PDS.

Re: A methode for dataset allocation.

PostPosted: Tue Oct 09, 2012 12:48 am
by prino
Half a track is 27998 bytes.

If you don't even have the maths skills to do the rest, please find a more appropriate job, one that will put less strain on your lonely grey cell.

Re: A methode for dataset allocation.

PostPosted: Tue Oct 09, 2012 12:52 am
by Robert Sample
First, a teminology note:
I want to allocate a QSAM.
had better mean that you want to allocate a QSAM file, or you are not going to proceed much further. And hopefully you mean a sequential file instead of "a QSAM".

Second, have you talked to the people / group that support your system? They may very well have developed a tool to provide you with what you are asking for. Some sites have tools like this, some sites do not. If your site does have such a tool, you will be expected to use it rather than rely upon what you get on this forum.

Third, you didn't bother to indiate whether or not EVERY record will be 240 bytes or if they can vary in length. This is something needed before a valid answer to your question can be provided.

Fourth, you are not clear -- are you wanting a method to ALLOCATE the data set, or are you looking for a method to CALCULATE the space parameters?

Re: A methode for dataset allocation.

PostPosted: Tue Oct 09, 2012 12:53 am
by enrico-sorichetti
here is a REXX script that will relieve the neuron strain

http://ibmmainframes.com/about55037.html

Re: A methode for dataset allocation.

PostPosted: Tue Oct 09, 2012 6:41 am
by steve-myers
Mehdi shri wrote:... I want to allocate a QSAM. ...
Mr. Sample's comment about terminology is accurate. Do not forget it.

QSAM is Queued Sequential Access Method. It is a method a program may use to read and write sequential data sets or members of a PDS. You cannot allocate a QSAM data set; there is no such animal. You allocate a sequential data set that a program can use QSAM to populate. The programmer, at least an Assembler programmer, has other options, but that is a matter for the programmer, it is not something for the user of the program to even know.

The factors used when allocating a data set are discussed in detail "MVS JCL User's Guide" and "MVS JCL Reference" for your z/OS release. Read about them there; this site does not provide tutorials. We will attempt to answer point questions about issues you do not understand after you have attempted to read the documentation. For what it's worth, *NIX people. if any, reading this paragraph, are laughing and saying, "What confusion. All we supply is a file name and *NIX handles all these gory details." Sadly, the *NIX folks have a valid point, though the *NIX folks won't usually also admit the trade off: *NIX usually requires more CPU time for file I/O than z/OS, and often requires more elapsed time.

Though you probably do not know this, an Assembler programmer does not select QSAM as the access method his program is going to use, at least by that name. It is not an option. Rather, the Assembler programmer specifies a code that indicates the macros the program will be using for input or output, and which way the macros will be used.

Re: A methode for dataset allocation.

PostPosted: Tue Oct 09, 2012 11:58 am
by Mehdi shri
Mr. Sample's
I want a method to CALCULATE the space parameters and the block size . My record is fixed lenght(240 byte)
Also this question about PDS.

Re: A methode for dataset allocation.

PostPosted: Tue Oct 09, 2012 12:04 pm
by enrico-sorichetti
did You click the link I posted ?

given a record length it provides the records x track for all the compatible block sizes

after that divide the number of records You need by the recordsXtrack and You will have the space needed