CDS039

Input Routine - Template Field

Last Revised: 05/26/2008

This program is the input routine used when the data is to be stored in a string template field.

There are two calling formats:

CALL "CDS039", ERR=XXXX, MINV, MAXV, COL, ROW, PROMPT$, TYPE$, REC$, FLDNAM${, INDEX, TIMEOUT}
CALL "CDS039", ERR=XXXX, S039$, REC$

S039$ Fields
Field Name Description
ERR=XXXX Take error branch if:
ERRCause of Error
0S039.TIMEOUT is passed, and operator does not make entry before time expired
99S039.FLDNAM$ does not exist in REC$
99REC$ is not a templated variable.
99S039.INDEX is invalid for S039.FLDNAM$
99Non-numeric data contained in field with a numeric template field type.
99REC$ does not match template
99T Type program name is blank or missing
99Error calling T Type program
40Numeric data entered is too large to fit in numeric template type
MINV/S039.MINV Minimum Value
MAXV/S039.MAXV Maximum Value
COL/S039.COL Display column
ROW/S039.ROW Display row
PROMPT$/S039.PROMPT$ Display prompt
TYPE$/S039.TYPE$ Entry Type - In addition to the TYPE$ options available to CDS069, CDS039 also supports T type external called routines.
ValueUsage
"TPROGNAME" or "T{PROGNAME}"Entry using program PROGNAME
"QTPROGNAME" or "QT{PROGNAME}"Display using program PROGNAME
REC$ The templated data structure containing the field to be entered or displayed
FLDNAM$/S039.FLDNAM$ Field name in REC$
INDEX/S039.INDEX Used for repeating data elements
TIMEOUT/S039.TIMEOUT Timeout minutes (1-4) or seconds 5+
S039.ONEVAL$ Contains the valid value when the field has only one value.  Only applies when using the second calling format.

Unlike bbx, CDS039 stores numeric data right justified in fixed length template fields.  This enables use of numeric data, stored in either N() or C() template field types in key segments.  CDS039 will use the masked value whenever the NUM() of the masked string does not cause an error due to a comma or special negative value indicator in the mask.

Refer to the documentation for CDS069 for additional details.