Lengths of areas passed to CICS commands

When a CICS® command includes a LENGTH option, it usually accepts the length as a signed halfword binary value. This places a theoretical upper limit of 32KB on the length. In practice, the limits are less than this 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 Application Programming Reference manual for programming information, including details of when you need to specify the LENGTH option. You should not let the length specified in CICS command options exceed 24KB, if possible.

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.

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 the CICS Application Programming Reference manual.

For journal commands, the restrictions apply to the sum of the LENGTH and PFXLENG values. (See Journaling.)

Journal records

For journal records, the journal buffer size may impose a limit lower than 64KB. Note that 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 24KB. For details, see the CICS System Definition Guide (for information about creating data sets) and the CICS Resource Definition Guide (for information about resource definition for files).

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 either to cause an error or to place a constraint on applications.

You will probably not find a this limit too much of a hindrance; online programs do not often handle such large amounts of data, for the sake of efficiency and response time.

Note:
The value in the LENGTH option must never exceed the length of the data area addressed by the command.
[[ Contents Previous Page | Next Page Index ]]