Argument lengths

Arguments in character form can be variable in length; the USERDATA option in the ACQUIRE TERMINAL command is an example. Where this occurs, CICS provides an option with which you can specify the length of the data and you must do so if you are coding in C/370.

In COBOL, PL/I, and assembler, however, you do not ordinarily need to specify this option because, if you omit it, the translator generates the length option and supplies the correct value using the language facilities. In COBOL, for example, if you write:
EXEC CICS ACQUIRE TERMINAL('ABCD')
          USERDATA(LOGONMSG) END-EXEC
the translator adds the USERDATALEN option, as if you had written:
EXEC CICS ACQUIRE TERMINAL('ABCD')
          USERDATALEN(LENGTH OF LOGONMSG)
          USERDATA(LOGONMSG) END-EXEC

Note that the translator gets the length directly from the variable name, so you must use a name with the correct length associated if you omit the length option.

In COBOL, PL/I, and assembler language, if the translator option NOLENGTH is used, the translator does not default the length options.