Retrieve Variable Length (RTVVARLXCL)
The Retrieve Variable Length (RTVVARLXCL) command retrieves the declared size in bytes of a character variable.
This function is also available with command RTVVARLEN in library VC2XCL. Any use of this alternative command name should be library qualified in case the i operating system were to use this command name in a future release.
| Keyword | Description | Choices | Notes |
| VAR |
Character variable |
Character value |
Required, Positional 1 |
| LEN |
Length |
Integer |
Required, Positional 2 |
Character variable (VAR)
Specifies the CL character variable.
This is a required parameter.
- character-value
- Specify the CL variable name.
Length (LEN)
Specifies the CL variable that is used to return the declared size of the character variable identified by the VAR parameter. The size is returned in bytes.
This is a required parameter.
- integer
- Specify the name of the CL variable.
Examples for RTVVARLXCL
Example 1: Simple Command Example
Dcl Var(&Var15) Type(*Char) Len(15)
Dcl Var(&VarLen) Type(*Int)
RtvVarLXCL Var(&Var15) Len(&VarLen)
This example demonstrates retrieving the declared size of a character variable. After the RTVVARLXCL command runs the value of CL variable &VarLen will be 15.
Error messages for RTVVARLXCL
*ESCAPE Messages
- XCL9002
- Function did not complete. See previously listed messages related to possible user errors.
- XCL9003
- Function did not complete. See previously listed messages for possible cause.
- XCL9004
- Function did not complete. See previously listed messages for possible cause.
|