Tricky CICS Interview Question on Updating VSAM records

The length of records in an ESDS, a fixed-length RRDS, or a fixed-length KSDS must not be changed on update.

However, the length of the record can be changed when rewriting to a KSDS with variable-length records.

For a file defined to CICS as containing fixed-length records, the length of record being rewritten must equal the original length.

Interview question:

However, when writing to a file with fixed-length records, you need not specify the LENGTH option. If you do, its value is checked against the defined value and you get a LENGERR condition if the values do not match.

For variable-length records, you must specify the LENGTH option with both the READ UPDATE and the REWRITE commands. The length must not be greater than the maximum defined to VSAM.

So, there is a difference between Fixed length and Variable length records during record UPDATE in CICS.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.