Lengths of areas passed to CICS commands
When a CICS® command includes a LENGTH option, it typically accepts the length as a signed halfword binary value. The use of a signed halfword binary value places a theoretical upper limit of 32 KB on the length. In practice, the limits are lower and vary for each command. The limits depend on data set definitions, recoverability requirements, buffer sizes, and local networking characteristics.
LENGTH options
In COBOL, C, C++, PL/I, and assembler language, the translator deals with lengths.
See the CICS API command reference for programming information, including details of when you need to specify the LENGTH option in specific commands. Where possible, do not let the length specified in CICS command options exceed 24 KB. For more information, see Translation considerations: LENGTH options in EXEC CICS commands.
Many commands involve the transfer of data between the application program and CICS. In all cases, the length of the data to be transferred must be provided by the application program.
When you use an EXEC CICS LINK command to pass data in a COMMAREA, ensure that you specify a LENGTH value that matches the length of the data being passed in the COMMAREA. Do not specify 0 (zero) for LENGTH, because the resulting behavior is unpredictable and the EXEC CICS LINK command might fail. When you use a COMMAREA to pass data, the program that is linked to must verify that the EIBCALEN field in the EIB of the task matches what the program expects. Discrepancies might result in storage violations or system failures. For more information, see Passing data to other programs by using COMMAREA.
In most cases, the LENGTH option must be specified if the SET option is used; the syntax of each command and its associated options show whether this rule applies.
There are options on the WAIT EXTERNAL command and a number of QUERY SECURITY commands that give the resource status or definition. CICS supplies the values associated with these options, hence the name, CICS-value data areas. The options are shown in the syntax of the commands with the term cvda in parentheses. For programming information about CVDAs, see CICS-value data areas (CVDAs).
For journal commands, the restrictions apply to the sum of the LENGTH and PFXLENG values. See Recovery design.
Journal records
For journal records, the journal buffer size can impose a limit lower than 64 KB. The limit applies to the sum of the LENGTH and PFXLENG values.
Data set definitions
For temporary storage, transient data, and file control, the data set definitions can impose limits lower than 24 KB.
For information about creating data sets, see Defining data sets. For information about resource definition for files, see FILE resources.
Recommendation
For any command in any system, 32,000 bytes is a good working limit for LENGTH specifications. Subject to user-specified record and buffer sizes, this limit is unlikely to cause an error or to place a constraint on applications.