Get String Information (CEEGSI) API


  Required Parameter Group:


  Omissible Parameter:


  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Get String Information (CEEGSI) API retrieves string information about a parameter used in the call to this API. String information describes the elements of a parameter, such as the type and the length of the string.

Authorities and Locks

None.


Required Parameter Group

posn (input)
The ordinal position in the parameter list of the formal parameter whose operational descriptor is required. A value of 1 denotes the leftmost parameter.

datatype (output)
The binary value of the data type field. The possible values and their data types are:
currlen (output)
A binary number containing the current number of elements in the string, as follows:
  • For strings of typeEsc, this is the length from the descriptor, and is equal to the maximum length returned in maxlen.
  • For strings of typeCharV2 and typeCharV4, this is the length from the argument (binary prefix) itself.
  • For strings of typeCharZ, the API determines the current length (in number of characters, either SBCS or DBCS) of the string by scanning for the null character. If the length in the descriptor is nonzero (the compiler of the caller knew the extent), the search is confined to that length. Otherwise, the scan continues until a null character is found.
  • If the data type was undefined, the contents of this field are undefined.

maxlen (output)
A binary number containing the maximum number of string elements, as follows:
  • For strings of typeEsc, this is the length from the descriptor, and is equal to the current length returned in currlen.
  • For strings of typeCharV2 and typeCharV4, this is the length from the descriptor (which does not include the length of the prefix).
  • For strings of typeCharZ, the maximum length is the number of the characters excluding the null character. It is the maximum length from the descriptor minus 1 (to account for the SBCS or DBCS null character). If the length in the descriptor is zero, the maximum length is set equal to the current length.
  • If the data type was undefined, the contents of this field are undefined.


Omissible Parameter

fc (output)
A 12-byte feedback code.

Feedback Codes and Conditions


Usage Notes



API introduced: V2R3

[ Back to top | ILE CEE APIs | APIs by category ]