Reuse of data sets

If you define a data set with the AMS REUSE attribute, it can also be emptied of data during a CICS run.

This allows it to be used as a work file. When the status of a file referencing the data set is CLOSED and DISABLED (or UNENABLED), you can use the SET EMPTY command, either from an application program using the EXEC CICS command-level interface, or from a master terminal using the master terminal CEMT command. This command sets an indicator in the installed file definition so that when the file is next opened, the VSAM high-used relative byte address (RBA) is set to zero, and the contents of the data set are effectively cleared.

If you define a data set to VSAM with the average and maximum record lengths equal, and define a file to CICS with fixed length records to reference that data set, the size of the records written to the data set must be of the defined size. For example, if a record in a data set has been read for update, you get errors when rewriting the record if, for example, you:
  • Defined the record sizes to VSAM as 250 bytes, with the parameter RECORDSIZE(250 250)
  • Defined the file to CICS with the parameter RECFORM=FIXED
  • Loaded the data set with records that are only 200 bytes long


dfha2c0077.html | Timestamp icon Last updated: Sunday, 4 June 2017