Search code examples
mainframejclvsam

How can I increase the length of variable-length record beyond 32760?


The maximum record-length for variable-length QSAM records is 32,760 bytes.

The current record-length of our file is OK for us, but in order to tackle some more info we have to expand this file which will have it's length beyond 32K (LRECL > 32760).

Splitting the record is not good option for us as it will impact our existing system.

I'm not sure whether using SPANNED records with VSAM here will solve this problem.

//DEFINE EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=A
//SYSIN     DD *

  DEFINE CLUSTER (NAME(dsname.K1719) INDEXED VOLUMES(xxxxxx) -
         TRACKS(1) KEYS(17 19) RECORDSIZE(40 110) SPANNED) -
         DATA (NAME(dsname.K1719.DATA)) INDEX (NAME(dsname.K1719.INDEX))
/*
//

Will this will solve our problem?


Solution

  • If you use Unix System Services files, you are not subject to the 32K limitation on LRECL. There are downstream effects.

    • If you are using COBOL to process the file you can use LINE SEQUENTIAL in the ORGANIZATION clause, but then you are limited to 1M LRECL.
    • If you are using COBOL to process the file you can eschew COBOL I/O
      and use C fopen() and so forth to get around the 1M LRECL limitation mentioned above, but then you are adding something a bit foreign to an admittedly hypothetical COBOL application. C would have no trouble with such files, I cannot speak to PL/I.
    • Not all DFSMS and third-party utilities are completely conscious of Unix System Services files.
    • JCL constructs for Unix System Services files have a relatively short learning curve, but there is a bit of learning required.
    • Security for Unix System Services files may be off-putting to your Security Administrator(s). You may find yourselves having to set up Access Control Lists via setfacl and other new concepts.