XVAR input result parameter structure

This structure contains the attributes (data type, length, and so on) of an input parameter that is passed to the user exit program identified through the %USER function. The same structure is used to define the attributes of the result returned from the user exit program.

This section introduces and describes each field in the structure.

Field Name Length (in bytes) Type Description
DATATYP 2 Integer The type of data passed to or returned from the user exit program.

Possible values:

1=Character, 2=Date, 3=Double Float, 4=Long Integer, 5=Packed Decimal, 6=Time, 7=Zoned Decimal

DATALEN 2 Integer The length of the data passed through the parameter (in bytes).
DATADGT 2 Integer The number of digits in numerical data passed through the parameter.
DATADEC 2 Integer The number of decimal places in numerical data passed through the parameter.
NULLVAL 2 Integer Indicates whether the data passed though the parameter is NULL.

Possible values:

0=Data is not NULL, 1=Data is NULL.

DTMFMT 4 Character The format of date or time data passed through the parameter.

Possible values for times:

*USA=HH:MM AM/PM, *HMS=HH MM SS, *ISO=HH.MM.SS, *EUR=HH.MM.SS, *JIS=HH:MM:SS

Possible values for dates:

*ISO=CCYY/MM/DD, *JIS=CCYY/MM/DD, *USA=MM/DD/CCYY, *EUR=DD/MM/CCYY, *YMD=YY/MM/DD, *MDY=MM/DD/YY, *DMY=DD/MM/YY, *JUL=YY.DDD

DATAVAL 2048 Character The data value passed as an input parameter or returned as a result of the user exit program invocation.

All input data is converted to character data, and the result of the user exit program invocation is returned as character data, always in UTF-8 encoding.