Mehdi shri wrote:... I want to allocate a QSAM. ...
Mr. Sample's comment about terminology is accurate. Do not forget it.
QSAM is Q
ethod. 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.