Fields of the interface control block

Use the fields of the interface control block to pass information to and from your exit routine.

Although there are separate interface control blocks that work with Assembler, PL/I, or COBOL, the fields of the interface control block are standard regardless of the programming language in which your edit exit routine is written. These fields are shown in the following table. Unless otherwise stated, each field relates to all formatting calls.

Language-specific versions of the edit exit interface control structure are located in the QMF1310.SDSQUSRn library (where n is a 1-character identifier that represents your national language):
  • For High-Level Assembler, use DSECT DXEECSA
  • For PL/I, use copy file DXEECSP
  • For COBOL, use copy book DXEECSC
Table 1. Fields of the QMF edit exit interface control block, DXEECS
Name Description
ECSDECPT Contains the current decimal point symbol as determined by the DECOPT option of the QMF profile (period or comma).
ECSECODE Contains the user edit code.
ECSERRET Contains a zero at the point of call. Set this to a nonzero return code to record an error. Use one of the values in the following list for an error of the indicated type:
Number
Error
99101
Unrecognized edit code
99102
Improper input data type for edit code
99103
Invalid input value for item to be formatted
99104
Item to be formatted is too short
99105
Not enough room for result in ECSRSLT (result is too wide for the space allotted)

The error codes listed (and their associated messages and help panels) are specific to the error. For any other code, a general error message, with a general help panel, is displayed.

ECSFREQ Holds E for a formatting call, T for a termination call.
ECSINDTA Contains information about the value to be formatted.
ECSINLEN Contains the length, in bytes, of the value to be formatted.
ECSINNUL Holds an N if the value to be formatted is null.
ECSINPRC Contains the precision of the value to be formatted. Applies only to U-type codes when the data type is DECIMAL, or to V-type codes when the character string to be formatted was derived from numeric data.
ECSINSCL Contains the scale of the value to be formatted. Applies only to U-type codes when the data type is DECIMAL, or to V-type codes when the character string to be formatted was derived from numeric data.
ECSINSGN Holds the sign of a converted numeric value (blank or - ). Applies only to V codes when the character string to be formatted was derived from numeric data.
ECSINTYP The internal database representation of the data type of the value to be formatted. The code shown here for each data type is the same as the value that appears in the SQLTYPE field of the SQLDA.
384
DATE data type
388
TIME data type
392
TIMESTAMP data type
448
VARCHAR data type
452
CHAR data type
456
LONG VARCHAR data type
464
VARGRAPHIC data type
468
GRAPHIC data type
472
LONG VARGRAPHIC data type
480
FLOAT data type
484
DECIMAL data type
492
BIGINT data type
496
INTEGER data type
500
SMALLINT data type
908
VARBINARY data type
912
BINARY data type
940
Extended FLOAT
996
DECFLOAT data type (both long format and extended format)
2448
TIMESTAMP WITH TIME ZONE data type
ECSNAME Contains the name of the control block, which is DXEECS. Serves as an eye catcher in storage dumps.
ECSRQMF Set this to T to request a termination call.
ECSRSDTA Contains information about the formatted result.
ECSRSLEN

Contains the length of the output area, in bytes. (This value is taken from the WIDTH column of the QMF form.) Do not use more memory in the output area than is indicated by the value in the ECSRSLEN field, or you will see error DSQ60439: User edit program memory overwrite.

ECSTHSEP Contains the thousands separator as determined by the DECOPT option of the QMF profile (blank or a comma).
ECSUSERS A 256-byte scratchpad area where your exit routine can record information that persists from one call to the next. On the first call after the edit routine is loaded, this field contains binary zeros.