Specifying GSAM data set attributes

When specifying GSAM data set attributes, the following settings are recommended.

  • On the DBD, specify RECFM. (It is required.)
  • On the DATASET statement, specify the logical record length using RECORD=. If the data set can become larger than 65535 tracks on a DASD volume and you want the data set to not span multiple volumes, specify the DSNTYPE=LARGE parameter.
  • On the DD statement, do not specify LRECL, RECFM, or BLKSIZE. The system determines block size, with the exception of RECFM=U. The system determines logical record length from the DBD.
  • For the PSB, specify PROCOPT=LS for output and GS for input. If you include S, GSAM uses multiple buffers instead of a single buffer for improved performance.

IMS will add 2 bytes to the record length value specified in the DBD in order to accommodate the ZZ field that is needed to make up the BSAM RDW. Whenever the database is GSAM or BSAM and the records are variable (V or VB), IMS will add 2 bytes to the record length value in the GSAM records passed by the application. Such addition allows IMS to accommodate the ZZ field that makes up the BSAM RDW (Record Descriptor Word).

Example of GSAM or BSAM where the records are variable

 //IDASD DD DUMMY
//ODASD DD UNIT=SYSDA,VOL=SER=000000,DISP=(,KEEP),
// SPACE=(TRK,(5,1)),DSN=GSAM.VARIABLE1,
// DCB=(RECFM=VB,BLKSIZE=32760,LRECL=32756)
//SYSIN DD *,DCB=BLKSIZE=80
S 1 1 1 1 1 DBDNAME
L ISRT
L V8187 DATA 1ST RECORD LOADED TO GSAM <---RDW
L ISRT
L V8187 DATA 2ND RECORD LOADED TO GSAM
L ISRT
L V8187 DATA 3RD RECORD LOADED TO GSAM
L ISRT
L V8187 DATA 4TH RECORD LOADED TO GSAM

In the above example, four GSAM records (IMS segment) can be contained in one 32756 byte (MVS) record.