CA Telon-generated programs perform field edits:
Standard field edit routines and modules
CA Telon supplies a number of standard field edit routines. This appendix documents these routines, the parameters they pass, and the processing they perform.
Customized field edit routines
You can also code your customized edit routines for use at your installation.
Specifying a field edit
In the TDF, you can specify a field edit when you create a panel definition. The value of the FLDTYPE field, appearing on TDF panel field update screens, defines the data type of the application screen field (date, dollar, state code, and so on) and determines the corresponding field edit logic called to validate or format the field.
The following identify valid FLDTYPE values associated with standard field edit routines. In these tables, the data type processed Alpha is defined as PIC X for COBOL and CHAR for PL/I. The data type Numeric is defined as PIC 9 for COBOL and PIC BINARY, or FLOAT for PL/I.
|
FLDTYPE Value |
Module Name |
Type |
Output Edit Action |
|---|---|---|---|
|
CAR |
OCAR |
Alpha |
Replaces unprintable characters with a period. |
|
CART |
OCART |
Alpha |
Replaces unprintable characters with a period. |
|
CJULIAN |
OCJULIAN OINTCJUL |
Numeric
|
(INTDATE=U ) Converts a date stored in ccyyddd format to the U.S. format of mm/dd/ccyy or mmddccyy, depending on the output field length. (INTDATE=I) Generates a call to OINTCJUL that converts a date stored in ccyyddd format to the international format of dd/mm/ccyy or ddmmccyy, depending on the output field length. Note: INTDATE is a parameter in TLNIIS, and the default is U. |
|
CDATE |
OCDATE |
Numeric |
(INTDATE=U ) Converts a date stored in ccyymmdd format to the U.S. format of mm/dd/ccyy or mmddccyy, depending on the output field length. (INTDATE=I) Generates a call to OINTCDT that converts a date stored in ccyymmdd format to the international format of dd/mm/ccyy or ddmmccyy, depending on the output field length. Note: INTDATE is a parameter in TLNIIS, and the default is U. |
|
DATE |
ODATE OINTLDT
|
Numeric |
(INTDATE=U ) Converts a date stored in yymmdd format to the U.S. format of mm/dd/yy or mmddyy, depending on the output field length. (INTDATE=I) Generates a call to OINTLDT that converts a date stored in yymmdd format to the international format of dd/mm/yy or ddmmyy, depending on the output field length. Note: INTDATE is a parameter in TLNIIS, and the default is U. |
|
FLNULL |
OFLNULL |
SQLNULL |
If the field is null, spaces are moved to TPO-FLDNAME. Otherwise, the data is processed as the OFLOAT field edit does. |
|
FLOAT |
OFLOAT OFORMAT |
Numeric |
Right-justifies a floating-point or signed-numeric field with an implied decimal point, using the smallest character representation possible with no loss of digits to the left of the (implied) decimal point. |
|
HEX |
OHEX |
Alpha |
Converts an EBCDIC character format item to hexadecimal. |
|
HEXA |
OHEXA |
Alpha |
Converts an EBCDIC character format item to hexadecimal. |
|
HEXP |
OHEXP |
Alpha |
Converts an EBCDIC character format item to hexadecimal. |
|
HEXT |
OHEXT |
Alpha |
Converts an EBCDIC character format item to hexadecimal. |
|
JULIAN |
OJULIAN OINTJUL |
Numeric |
(INTDATE=U) Converts a date stored in yyddd format to the U.S. format of mm/dd/yy or mmddyy, depending on the output field length. (INTDATE=I) Generates a call to OINTLJUL that converts a date stored in yyddd format to the international formats dd/mm/yy or ddmmyy, depending on the output field length. Note: INTDATE is a parameter in TLNIIS, and the default is U. |
|
NULL |
ONULL |
SQLNULL |
If the field is null, spaces are moved to TPO-FLDNAME. Otherwise, the output field name is moved to TPO-FLDNAME. |
|
NUMNULL |
OFLNULL |
ONUMNULL |
If the field is null, spaces are moved to TPO-FLDNAME. Otherwise, TPO-FLDNAME is formatted using the output fieldname integers, and they are right-justified and blank-filled. |
|
SSA |
OSSA |
Alpha |
(DL/I processing only.) Parses an IMS SSA to determine the input SSA length. Returns both the SSA length and the SSA itself. Specified in the PIC field of the Update Output/Input/Outin Field screen. |
|
VCHAR |
OVCHAR |
Variable character |
Maps data from DBNAME hvname to TPO-fldname, where hvname is defined for the SQL VARCHAR column. |
|
VNULL |
OVNULL |
SQLNULL |
If the field is null, spaces are moved to TPO-FLDNAME. Otherwise, the data is mapped from DBNAME hvname to TPO-FLDNAME, where hvname is defined for SQL VARCHAR column. |
|
FLDTYPE Name |
Module Value |
Type |
Input Edit Action |
|---|---|---|---|
|
CDATE |
ICDATE IINTCDT |
Numeric |
(Set INTDATE=U) Edits a date field for a valid U.S. format of mm/dd/ccyy, mm-dd-ccyy, or mmddccyy, depending on the input field length; then converts it to ccyymmdd format. (INTDATE=I) Generates a call to IINTCDT that edits a date field for a valid International format of dd/mm/ccyy, dd-mm-ccyy, or ddmmccyy, depending on the input field length; then converts it to ccyymmdd format. Note: INTDATE is a parameter in TLNIIS and the default is U. |
|
CJULIAN |
ICJULIAN IINTCJUL |
Numeric |
(Set INTDATE=U) Edits a date field for a valid U.S. format of mm/dd/ccyy, mm-dd-ccyy, or mmddccyy, depending on the input field length; then converts it to ccyyddd format. (INTDATE=I) Generates a call to IINTCJUL that edits a date field for a valid International format of dd/mm/ccyy, dd-mm-ccyy, or ddmmccyy, depending on the input field length; then converts it to ccyyddd format. Note: INTDATE is a parameter in TLNIIS and the default is U. |
|
DATE |
IDATE IINTLDT |
Numeric |
(Set INTDATE=U) Edits a date field for a valid U.S. format of mm/dd/yy, mm-dd-yy or mmddyy, depending on the input field length; then converts it to yymmdd format. (INTDATE=I) Generates a call to IINTLDT that edits a date field for a valid International format of dd/mm/yy, dd-mm-yy, or ddmmyy, depending on the input field length; then converts it to yymmdd format. Note: INTDATE is a parameter in TLNIIS and the default is U. |
|
DOLLAR |
IDOLLAR IBDOL ICURRNCY |
Numeric |
(INTDATE=U) Edits a field for a valid U.S. dollar and cents format (that is, two decimal places preceded by a period). This field does not accept negatives. (INTDATE=I) Generates a call to ICURRNCY that edits a field for a valid International currency format (that is, two decimal places preceded by a comma). INTDATE is a parameter in TLNIIS and the default is U. |
|
FLNULL |
IFLNULL |
SQLNULL |
If completely blank on input, FLNULL sets the null indicator. Otherwise, FLNULL edits a field for numeric format, allowing for a decimal point and a leading sign. |
|
FLOAT |
IFLOAT |
Numeric |
Edits a field for valid numeric format, allowing for a decimal point and leading sign. |
|
FULLCAR |
IFULLCAR |
Alpha |
Edits an input field to ensure there are no blanks in the field. |
|
FULLNUM |
IFULLNUM |
Numeric |
Edits a numeric field to ensure that all characters are numeric. |
|
JULIAN |
IJULIAN |
Numeric |
(INTDATE=U) Edits a date field for a valid U.S. format of mm/dd/yy, mm-dd-yy, or mmddyy, depending on the input field length; then converts it to yyddd format. (INTDATE=I) Generates a call to IINTLJUL that edits a date field for a valid International format of dd/mm/yy, dd-mm-yy, or ddmmyy, depending on the input field length; then converts it to yyddd format. Note: INTDATE is a parameter in TLNIIS and the default is U. |
|
LALPHA |
ILALPHA |
Alpha |
Left-justifies a character field. |
|
LNULL |
ILNULL |
SQLNULL |
If blank on input, LNULL sets the null indicator. Otherwise, LNULL left-justifies a character field. |
|
LVCHAR |
ILVCHAR |
Variable character |
Left-justifies a character field (hvname is defined for SQL VARCHAR column). |
|
LVNULL |
ILVNULL |
SQLNULL |
If blank on input, LVNULL sets the null indicator. Otherwise, LVNULL left-justifies a variable-length character field into DBNAME hvname (hvname is defined for the SQL VARCHAR column). |
|
NBALPHA |
INBALPHA |
Alpha |
Edits a field to ensure there are no embedded blanks. NBALPHA allows leading and/or trailing blanks; FULLCAR does not. |
|
NBNULL |
INBNULL |
SQLNULL |
If blank on input, NBNULL sets the null indicator. Otherwise, NBNULL edits a field to ensure there are no embedded blanks. |
|
NBVCHAR |
INBVCHAR |
Variable character |
Edits a field to ensure there are no embedded blanks. (hvname is defined for SQL VARCHAR column.) |
|
NBVNULL |
INBVNULL |
SQLNULL |
If blank on input, NBVNULL sets the null indicator. Otherwise, NBVNULL edits a variable-length character field to ensure there are no embedded blanks. |
|
NULL |
INULL |
SQLNULL |
If blank on input, NULL sets the null indicator. Otherwise, NULL maps data from TPI-FLDNAME to DBNAME. |
|
NUMERIC |
INUMERIC |
Numeric |
Edits a field for valid numeric format, allowing for leading or trailing blanks (or both). |
|
NUMNULL |
INUMNULL |
SQLNULL |
If blank on input, NUMNULL sets the null indicator. Otherwise, NUMNULL edits a field for valid numeric format, allowing for leading and/or trailing spaces. |
|
TATE |
ISTATE |
Alpha |
Edits a field for valid two-character postal state code. |
|
VCHAR |
IVCHAR |
Variable character |
Maps data from TPO-fldname to DBNAME hvname (hvname is defined for SQL VARCHAR column). |
|
VNULL |
IVNULL |
SQLNULL |
If blank on input, VNULL sets the null indicator. Otherwise, VNULL maps data from TPI-fldname to DBNAME hvname (hvname is defined for the SQL VARCHAR column.) |
The following table lists standard field edit modules provided by CA Telon and summarizes the edit function associated with each module.
Detailed documentation of each call module is provided after the table that includes:
See 1 for more information about edit processing.
|
Module Name |
Edit Function |
|---|---|
|
OCAR |
Replace unprintable characters with periods |
|
OCART |
Replace unprintable characters with periods |
|
OCDATE |
Format century date |
|
OCJULIAN |
Convert century Julian date to mm/dd/ccyy |
|
ODATE |
Format date |
|
OFLNULL |
Format a floating-point field that may be null |
|
OFLOAT |
Format a floating-point field |
|
OFORMAT |
Reformat for output |
|
OHEX |
Convert character to hex |
|
OHEXA |
Convert characters to hex representation |
|
OHEXP |
Convert characters to hex representation |
|
OHEXT |
Convert characters to hex representation |
|
OINTCDT |
Format century date (international) |
|
OINTCJUL |
Format century Julian date (international) |
|
OINTLDT |
Format date (international) |
|
OINTLJUL |
Format Julian date (international) |
|
OJULIAN |
Convert Julian date to mm/dd/yy |
|
ONULL |
Format field based on null indicator |
|
ONUMNULL |
Format integer field based on null indicator |
|
OSSA |
Determine length of SSA |
|
OVCHAR |
Alphanumeric move from variable-length character field |
|
OVNULL |
Alphanumeric move from variable-length character field |
|
IBDOL |
Validate dollar entry |
|
IBCURR |
Validate international currency entry |
|
ICURRNCY |
Validate international currency entry |
|
IBNUM |
Validate numeric entry |
|
ICDATE |
Check for valid century date |
|
ICJULIAN |
Convert century date to century Julian |
|
IDATE |
Check for valid date |
|
IDOLLAR |
Check for dollar/currency entry |
|
IFLNULL |
Validate floating-point entry and set null indicator |
|
IFLOAT |
Check for floating-point number |
|
IFULLCAR |
Check for blanks |
|
IFORMAT |
Validate and reformat on input |
|
IFULLNUM |
Check for all numeric characters |
|
IHEX |
Convert hex representation to hex characters |
|
IHEXA |
Convert hex representation to hex characters |
|
IINTCDT |
Validate century date (international) |
|
IINTCJUL |
Convert century date to century Julian (international) |
|
IINTLDT |
Validate date (international) |
|
IINTLJUL |
Validate date (international) |
|
IJULIAN |
Convert date to Julian |
|
ILALPHA |
Left-justify a character field |
|
ILNULL |
Set null indicator and left-justify character field |
|
ILVCHAR |
Left-justify a variable-length character field |
|
ILVNULL |
Left-justify a variable-length length field and set null indicator |
|
INBALPHA |
Check for imbedded blanks |
|
INBNULL |
Check for imbedded blanks and set null indicator |
|
INBVCHAR |
Check for imbedded blanks |
|
INBVNULL |
Check blanks for variable-length field and set null indicator |
|
INULL |
Set null indicator |
|
INUMERIC |
Check for valid integer |
|
INUMNULL |
Check for valid integer and set null indicator |
|
ISTATE |
Check for valid state code |
|
IVCHAR |
Alphanumeric move to variable-length character field |
|
IVNULL |
Set null indicator for variable-length field |
Function
Replaces unprintable characters with periods.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPO-fieldname-LTH |
Length of the edited field. This must be between 1 and 256. |
|
Input |
output-fieldname |
Field to be edited by this routine. |
|
Output |
TPO-fieldname |
Edited output of the routine that is returned to the TPO buffer. |
Edit processing
Function
Replaces unprintable characters with periods. The difference between this field edit and IHEX is that this edit is passed the address of the field to be converted, rather than the value of the field itself.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPO-fieldname-LTH |
Length of the edited field. This must be between 1 and 256. |
|
Input |
output-fieldname |
Field to be edited by this routine. |
|
Output |
TPO-fieldname |
Edited output of the routine that is returned to the TPO buffer. |
Edit processing
Function
Format a date stored as ccyymmdd for output as either mm/dd/cc/yy (if TPO-datefield-LTH is 10) or mmddccyy (if the TPO-datefield-LTH is 8).
Note: If the INTDATE parameter in the TLNIIS macro is set to I, a call to OINTCDT is generated in place of a call to ODATE. For more information, refer to OINTCDT.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 000ccyymmdd0000000. In a PL/I PIC 10(9)V(4)9T field, it is laid out as 00ccyymmdd00000. |
|
Input |
TPO-datefield-LTH |
Length of the output field. |
|
Output |
TPO-datefield |
Edited date returned to the TPO buffer. |
Edit processing
Function
Formats a date stored in ccyyddd for output as mm/dd/ccyy (if TPO-datefield-LTH is 10) or mmddccyy (if TPO-datefield-LTH is 8).
Note: If the INTDATE parameter in the TLNIIS macro is set to 'I,' a call to OINTCJUL is generated in place of a call to OCJULIAN. See OINTCJUL for more information.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 0000ccyyddd0000000. In a PL/I PIC (10)9V(4)9T field, it is laid out as 000ccyyddd00000. |
|
Input |
TPO-fieldname-LTH |
Length of the output field. |
|
Output |
TPO-fieldname |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Note: If ddd is greater than 365 (366 for leap year), yy is adjusted one year for each additional 365 (366) days.
Function
Formats a date stored as yymmdd for output as either mm/dd/yy (if TPO-datefield-LTH is 8) or mmddyy (if the TPO-datefield-LTH is 6).
Note: If the INTDATE parameter in the TLNIIS macro is set to 'I', a call to OINTLDT is generated in place of a call to ODATE. For more information, see 33.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 00000yymmdd0000000. In a PL/I (10)9V(4)9T field, it is laid out as 0000yymmdd00000. |
|
Input |
TPO-datefield-LTH |
Length of the output field. |
|
Output |
TPO-datefield |
Edited date returned to the TPO buffer. |
Edit processing
Function
Right-justifies a floating-point or signed-numeric field.
If the null indicator is set, the output field is set to spaces. The edit uses the minimum number of characters required to include all significant digits to the left of the implied decimal point. Then, given the output field length, it formats as many significant digits to the right of the decimal point as possible. Extra digits to the right of the decimal are truncated, not rounded.
The routine signifies an overflow condition (the output field is too small to contain the whole number) by filling the output field with all asterisks (*).
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Numeric value from the DBNAME field to be edited. In COBOL, PIC S9(11)V9(7); in PL/I, PIC (10)9V(7)9T. |
|
Input |
TPO-fieldname-LTH |
Length of the output field. It must be 1 to 18 bytes for COBOL, 1 to 15 for PL/I. |
|
Input |
WK-fieldname-NV |
Null indicator variable, set to -1 by SQL when the DBNAME is null. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO output buffer. |
Edit processing
Function
Right-justify a floating-point or signed-numeric field.
The edit uses the minimum number of characters required to include all significant digits to the left of the implied decimal point. Then, given the output field length, it formats as many significant digits right of the decimal point as possible. Extra digits right of the decimal are truncated, not rounded.
The routine signifies an overflow condition by filling the output field with all plus (+) or minus (-) signs, depending on the sign of the input value.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Value to be edited. Before editing, the value is moved to this field from the DBNAME field to be output. In COBOL, PIC S9(11)V9(7); in PL/I, PIC (10)9V(4)9T. |
|
Input |
TPO-fieldname-LTH |
Length of the edited field. It must be from one to 18 bytes. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO output buffer. |
Edit processing
Function
Reformats output.
Specification for this special edit is made by entering the FORMAT command in the SPEC field on the Update Output/Input/Outin Field screen or the Update Batch Output Fields screen. See Update Output/Input/Outin Field for more information.
Converts a character string to the hexadecimal equivalent for each character.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
output-fieldname |
Field holding the characters to be converted to hex. |
|
Input |
TPO-fieldname-LTH |
Length of the edited field. It can be from 2 to 256 bytes long. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO buffer. |
Edit processing
Function
Converts a one- to four-character string to the hexadecimal equivalent for each character (for example, 'AB12' converts to 'C1C2F1F2'). This field edit is designed specifically for converting addresses.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPO-fieldname-LTH |
Length of the edited field. This must be between 1 and 256. |
|
Input |
output-fieldname |
Field to be converted by this routine. |
|
Output |
TPO-fieldname |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Function
Converts a one- to four-character string to the hexadecimal equivalent for each character (for example, 'AB12' converts to 'C1C2F1F2'). The difference between this field edit and OHEX is that this edit is passed the address of the field to be converted, rather than the value of the field itself.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPO-fieldname-LTH |
Length of the edited field. This must be between 1 and 256. |
|
Input |
output-fieldname |
Field to be converted by this routine. |
|
Output |
TPO-fieldname |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Function
Converts a one- to four-character string to the hexadecimal equivalent for each character (for example, 'AB12' converts to 'C1C2F1F2'). The difference between this field edit and OHEX is that this edit is passed the address of the field to be converted, rather than the value of the field itself.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPO-fieldname-LTH |
Length of the edited field. This must be between 1 and 256. |
|
Input |
output-fieldname |
Field to be converted by this routine. |
|
Output |
TPO-fieldname |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Function
Reformats a date stored in ccyymmdd to dd/mm/ccyy (if TPO-datefield-LTH is 10) or to ddmmccyy (if the TPO-datefield-LTH is 8).
A call to this field is generated in either of the following cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 000ccyymmdd0000000. In a PL/I PIC (10)9V(4)9T field, it is laid out as 00ccyymmdd00000. |
|
Input |
TPO-datefield-LTH |
Length of the output field. |
|
Output |
TPO-datefield |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Function
Reformats a date stored in ccyyddd format to dd/mm/ccyy (if TPO-datefield-LTH is 10) or ddmmccyy (if TPO-datefield-LTH is 8).
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 0000ccyyddd0000000. In a PL/I PIC (10)9V(4)9T field, it is laid out as 000ccyyddd00000. |
|
Input |
TPO-datefield-LTH |
Length of the output field. |
|
Output |
TPO-datefield |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Note: If ddd is greater than 365 (366 for leap year), yy is adjusted one year for each additional 365 (366) days.
Function
Reformats a date stored in yymmdd format to dd/mm/yy (if TPO-datefield-LTH is 8) or ddmmyy (if TPO-datefield-LTH is 6).
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 00000yymmdd0000000. In a PL/I PIC(10)9V(4)9T field, the date is laid out as 0000yymmdd00000. |
|
Input |
TPO-datefield-LTH |
Length of the output field. |
|
Output |
TPO-datefield |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Function
Reformat a date stored in yyddd format to dd/mm/yy (if the TPO-datefield-LTH is 8) or ddmmyy (if the TPO-datefield-LTH is 6).
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 000000yyddd0000000. In a PL/I PIC (10)9V(4)9T field, the date is laid out as 00000yyddd00000. |
|
Input |
TPO-datefield-LTH |
Length of the output field. |
|
Output |
TPO-datefield |
Converted output of the routine that is returned to the TPO buffer. |
Edit processing
Note: If ddd is greater than 365 (366 for leap year), yy is adjusted one year for each additional 365 (366) days.
Function
Formats a date stored as yyddd for output as mm/dd/yy (if TPO-datefield-LTH is 8) or mmddyy (if TPO-datefield-LTH is 6).
Note: If the INTDATE parameter in the macro TLNIIS is set to 'I', a call to OINTLJUL is generated in place of a call to OJULIAN. For more information, see OINTLJUL.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Date to be edited. It is the numeric value moved from the DBDNAME field. In a COBOL PIC S9(11)V9(7) field the date is last out as 000000yyddd0000000. In a PL/I as 00000yyddd00000. |
|
Input |
TPO-fieldname-LTH |
Length of the output field. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO output buffer. |
Edit processing
Note: If ddd is greater than 365 (366 for leap year), yy is adjusted up one year for each additional 365 (or 366) days.
Function
Formats an output character field based on the null indicator.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
OUTPUT-fieldname |
Field containing the characters to be output. The length of OUTPUT-fieldname (DBNAME) must be at least as long as TPO-fieldname. |
|
Input |
TPO-fieldname-LTH |
Length of the output field. |
|
Input |
WK-fieldname-NN |
Null indicator variable, set to -1 by SQL when OUTPUT-fieldname is null. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO output buffer. |
Edit processing
Function
Right-justify an output integer to conform with a length specified by a PIC parameter on a Field statement.
If the null indicator is set, the output field is set to spaces. Otherwise, this edit right-justifies a numeric field.
The routine signifies an overflow condition by filling the output field with asterisks (*).
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
WORKFLD-NUMERIC |
Numeric value from the DBNAME field to be edited. In COBOL, PIC S9(11)V9(7); in PL/I, PIC(10)9V(4)9T. |
|
Input |
TPO-fieldname-LTH |
Length of the output field. |
|
Input |
WK-fieldname-NN |
Null indicator variable, set to -1 by SQL when the DBNAME is null. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO output buffer. |
Edit processing
Function
Determines the length of an input SSA.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
segmentname-SSA |
IMS SSA. |
|
Output |
TPO-ssaname |
The SSA moved to the TPO output buffer. |
|
Output |
TPO-ssaname-LTH |
Length of the SSA, to a maximum of 256. |
Edit processing
If, instead, a left paren is found, process the SSA as unqualified. Search until an equal number of right and left parentheses is found, or until the maximum TPO-ssaname-LTH (256) is reached.
Function
Returns a variable-length character field and length.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
output-fieldname |
Variable-length character field containing the characters to be output. |
|
Input |
TPO-fieldname-LTH |
Length of the edited field. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO buffer. |
Edit processing
Function
Returns a variable-length character field and length by performing an alphanumeric move from a variable-length character field based on the null indicator.
If the null indicator is set, the output field is set to spaces. Otherwise, the character portion of the variable-length character field is moved to the output buffer.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
OUTPUT-fieldname |
Variable-length character field containing the characters to be output. |
|
Input |
TPO-fieldname-LTH |
Length of the output field. |
|
Input |
WK-fieldname-NN |
Null indicator variable, set to -1 by SQL when DBNAME is null. |
|
Output |
TPO-fieldname |
Edited field returned to the TPO output buffer. |
Edit processing
Function
Checks input for valid dollar format, with a period (.) separating dollars and cents.
The difference between this field edit and IDOLLAR is that it allows larger numbers to be validated because the WORKFLD-NUMERIC-1 field in which the validated entry is returned is defined as PIC S9(16)V9(2) for COBOL, PIC (13)9V9T for PL/I.
Note: If the INTDATE parameter in the macro TLNIIS is set to 'I', a call to IBCURR is generated in place of a call to IBDOL. For more information, see IBCURR.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the output field. |
|
Input |
TPI-fieldname |
Value to be edited for valid dollar amount, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC-1 |
Validated value, in format PIC S9(16)V9(2) for COBOL, PIC (13)9V9T for PL/I. |
Edit processing
Function
Checks for valid international currency entry (that is, with a comma separating the last two digits of the numeric entry). The difference between this field edit and ICURRNCY is that it allows larger numbers to be validated because the WORKFLD-NUMERIC-1 field in which the validated entry is returned is defined as PIC S9(16)V9(2) for COBOL, PIC (13)9V9T for PL/I.
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the output field. |
|
Input |
TPI-fieldname |
Value to be edited for valid currency amount, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC-1 |
Validated value, in format PIC S9(16)V9(2) for COBOL, PIC (13)9V9T for PL/I. |
Edit processing
Function
Checks a field for valid integer characteristics. The difference between this field edit and ICURRNCY is that it allows larger numbers to be validated because the WORKFLD-NUMERIC-1 field in which the validated entry is returned is defined as PIC 9(16)V9(2)T for COBOL, PIC (13)9V9T for PL/I.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the output field. |
|
Input |
TPI-fieldname |
Value to be edited for valid integer amount, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC-1 |
Validated value, in format PIC 9(16)V9(2) for COBOL, PIC (13)9V9T for PL/I. |
Edit processing
Function
Checks input for valid date format, mm/dd/ccyy or mm-dd-ccyy (if TPO-datefield-LTH is 10) or mmddccyy (if TPO-datefield-Lth is 6), and stores it as ccyymmdd.
Note: If the INTDATE parameter in the TLNIIS macro is set to 'I,' a call to IINTCDT is generated in place of a call to IDATE. See 1.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-datefield-LTH |
Length of the input field. It must be a halfword binary with a value of 8 or 10. |
|
Input |
TPI-datefield |
Contents of the TP input buffer (the date to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Result of the edit, in a COBOL PIC S9(11)V9(7)9 field, the date is laid out as 000ccyymmdd0000000 for COBOL or 00ccyymmdd00000. The program moves this to the appropriate storage area after return from the edit routine. |
Edit processing
Note: The characters cc and yy are tested for only valid numeric characters. The characters dd and mm are edited for valid characters.
Function
Checks for valid international currency entry (that is, with a comma separating the last two digits of the numeric entry).
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the output field. |
|
Input |
TPI-fieldname |
Value to be edited for valid currency amount, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Validated value, in format PIC S9(11)V9(7) for COBOL, PIC (10)9V(4)9T for PL/I. |
Edit processing
Function
Checks input for valid date format, mm/dd/yy or mm-dd-yy (if TPI-datefield-LTH is 8) or mmddyy (if TPI-datefield-LTH is 6), and stores it as yymmdd.
Note: If the INTDATE parameter in the macro TLNIIS is set to 'I,' a call to IINTLDT is generated in place of a call to IDATE. For more information, see IINTLDT.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-datefield-LTH |
Length of the input field. It must be a halfword binary with a value of 6 or 8. |
|
Input |
TPI-datefield |
Contents of the TP input buffer (the date to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Result of the edit in a COBOL PIC S9(11)V9(7) field, the date is laid out as 00000yymmdd0000000. For PL/I PIC (10)9V(4)9T field, the date is laid out as or 0000yymmdd00000. The program moves this to the appropriate storage area after return from the edit routine. |
Edit processing
Note: Yy is tested for only valid numeric characters. Dd and mm are edited for valid characters.
Function
Checks input for valid dollar format, with a period (.) separating dollars and cents.
Note: If the INTDATE parameter in the macro TLNIIS is set to 'I', a call to ICURRNCY is generated in place of a call to IDOLLAR. For more information, see ICURRNCY.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the dollar amount to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Result of the edit in the COBOL PIC S9(11)V9(7) format or PL/I PIC (10)9V(4)9T format. |
Edit processing
Function
Checks a field for a valid number. This allows for a leading sign and an optional decimal point.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the number to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Result of the edit in the COBOL S9(11)V9(7) format or PL/I PIC (10)9V(4)9T format. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0 and:
WORKFLD-NUMERIC = 0 +│- WS-FIELD-NUM
+│- is the sign stored as the first nonblank character from the input field. If no character is found, plus (+) is assumed.
Function
Checks a field for a valid number. This allows for a leading sign and optional decimal point.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the number to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Result of the edit in the COBOL S9(11)V9(7) format or PL/I PIC (10)9V(4)9T format. |
Edit processing
WORKFLD-NUMERIC = 0 {+│-} ES-FIELD-NUM.
+│- is the sign stored as the first nonblank character from the input field. If no character is found, plus (+) is assumed.
If any of the remaining unprocessed characters are not blanks, exit with error code G122.
Function
Verify that there are no blanks in an input field. The difference between IFULLCAR and INBALPHA is that IFULLCAR allows no blanks at all. INBALPHA allows leading and trailing blanks.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the character field being checked for blanks). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-ALPHA |
Edited field. It is a 256-byte alphanumeric field. |
Edit processing
Function
Reformats input.
Specification for this special edit is made by entering the FORMAT command in the SPEC field on the Update Output/Input/Outin Field screen.
See Update Output/Input/Outin Field or Update Batch Output Fields for more information.
Verify that all input characters in the field are numeric.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the number being checked). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Edited field in the COBOL S9(11)V9(7) format or the PL/I PIC (10)9V(4)9T format. |
Edit processing
Function
Converts a hex-character string to the hexadecimal equivalent for each pair of hex-character representations (for example, 'C1F2' converts to 'A1').
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the edited field. This must be between 1 and 256. |
|
Input |
TPI-fieldname |
Field to be converted by this routine, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. |
|
Output |
WORKFLD-ALPHA |
Converted value. |
Edit processing
Function
Converts a hex-character string of one to eight bytes to the hexadecimal equivalent for each pair of hex-character representations (for example, 'C1F2' converts to 'A1'). This field edit is designed specifically for converting addresses.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the edited field. This must be between 1 and 256. |
|
Input |
TPI-fieldname |
Field to be converted by this routine, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. |
|
Output |
WORKFLD-ALPHA |
Converted value. |
Edit processing
Function
Validates a date entered as dd/mm/ccyy or dd-mm-ccyy (if TPI-datefield-LTH is 10) and stores it in ccyymmdd format.
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-datefield-LTH |
Length of the input field. It must be eight or ten bytes. |
|
Input |
TPI-datefield |
Field to be validated by this routine, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Converted date. In a COBOL PIC S9 (11) V9 (7) field, the date is laid out as 000ccyymmdd0000000. In a PL/I PIC (10)9V (4)9T field, the date is laid out as 00ccyymmdd00000. |
Edit processing
Note: Cc and yy are tested only for valid numeric characters. Dd and mm are edited for both numeric and valid month-day combinations.
Function
Validates a date entered as dd/mm/ccyy or dd-mm-ccyy (if TPI-datefield-LTH is 10) and stores it in ccyyddd format.
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-datefield-LTH |
Length of the input field. It must be eight or ten bytes. |
|
Input |
TPI-datefield |
Field to be validated by this routine, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Converted date. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 0000ccyyddd0000000. In a PL/I PIC (10)9V(4)9T field, the date is laid out as 000ccyyddd00000. |
Edit processing
Note: Cc and yy are tested only for valid numeric characters. Dd and mm are edited for both numeric and valid month-day combinations.
Function
Checks input for a valid date format, mm/dd/ccyy or mmd-dd-ccyy (if TPI-datefield-LTH is 10) or mmddccyy (if TPI-datefield-LTH is 8).
Note: If the INTDATE parameter in TLNIIS is set to 'I,' a call to IINTCJUL is generated in place of a call to ICJULIAN. See IINTCJUL later in this appendix.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. It must be eight or ten bytes. |
|
Input |
TPI-fieldname |
Field to be validated by this routine, from the TP input buffer (the date to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Julian date in a COBOL PIC S9(11)V9(7) format laid out as 0000ccyyddd0000000 or a PL/I PIC (10)9V(4)9T format laid out as 000ccyyddd00000 in PL/I. |
Edit processing
Function
Validates a date entered as dd/mm/yy or dd-mm-yy (if TPI-datefield-LTH is 8), or ddmmyy (if TPI-datefield-LTH is 6), and stores it in yymmdd format
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-datefield-LTH |
Length of the input field. It must be six or eight bytes. |
|
Input |
TPI-datefield |
Field to be validated by this routine, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Converted date. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 00000yymmdd0000000. In a PL/I PIC (10)9V(4)9T field, the date is laid out as 0000yymmdd00000. |
Edit processing
Note: Yy is tested only for valid numeric characters. Dd and mm are edited for both numeric and valid month-day combinations.
Function
Validates a date entered as dd/mm/yy or dd-mm-yy (if TPI-datefield-LTH is 8) or ddmmyy (if TPI-datefield-LTH is 6), and store it in yyddd format.
A call to this field edit is generated in either of these cases:
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-datefield-LTH |
Length of the input field. It must be six or eight bytes. |
|
Input |
TPI-datefield |
Field to be validated by this routine, from the TP input buffer. |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Converted date. In a COBOL PIC S9(11)V9(7) field, the date is laid out as 000000yyddd0000000. In a PL/I PIC (10)9V(4)9T field, the date is laid out as 00000yyddd00000. |
Edit processing
Note: Yy is tested only for valid numeric characters. Dd and mm are edited for both numeric and valid month-day combinations.
Function
Checks input for a valid date format, mm/dd/yy or mm-dd-yy (if TPI-datefield-LTH is 8) or mmddyy (if TPI-datefield-LTH is 6).
Note: If the INTDATE parameter in the macro TLNIIS is set to 'I', a call to IINTLJUL is generated in place of a call to IJULIAN. For more information, see IINTLJUL.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. This must be 6 or 8. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the date to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Returns the Julian date in a COBOL PIC S9(11)V9(7) field, the date is laid out as 000000yyddd0000000 in a PL/I PIC (10)9V(4)9T field, the date is laid out as 00000yyddd00000. |
Edit processing
Function
Left-justifies a character field.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input fields. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the field to be left-justified). |
|
Output |
WORKFLD-ALPHA |
Edited field as a 256-byte alphanumeric field. |
Edit processing
Function
Left-justifies a character field.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the field to be left-justified). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-ALPHA |
Result of the edit as a 256-byte alphanumeric field. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0 and:
Function
Left-justifies a variable-length character field.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input fields. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the variable length field to be left-justified). |
|
Output |
WORKFLD-VCHAR |
Edited field as a 256-byte alphanumeric variable-length field. |
Edit processing
Function
Left-justifies a variable-length character field.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the variable-length field to be left-justified). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-VCHAR |
Result of the edit as a 256-byte variable-length alphanumeric field. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0, and:
Function
Checks for imbedded blanks. INBALPHA differs from IFULLCAR because it allows leading and trailing blanks. IFULLCAR allows neither.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the character field being checked for imbedded blanks). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-ALPHA |
Edited field in a 256-byte alphanumeric field. |
Edit processing
Function
Checks for imbedded blanks. This edit allows for leading and trailing blanks.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the field being checked for imbedded blanks). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-ALPHA |
Result of the edit as a 256-byte alphanumeric field. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0, and:
Function
Checks for imbedded blanks. This edit allows leading and trailing blanks.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input fields. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the variable-length character field being checked for imbedded blanks). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-VCHAR |
Edited field in a 256-byte alphanumeric variable-length field. |
Edit processing
Function
Checks for imbedded blanks in a variable-length character field. This edit allows for leading and trailing blanks.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the variable-length field being checked for imbedded blanks). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-VCHAR |
Result of the edit as a 256-byte variable-length alphanumeric field. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0, and:
Function
Checks for a completely blank field.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the field to be checked). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-ALPHA |
Returns the result of the edit as a 256-byte alphanumeric field. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0, and move the contents of TPI-fieldname to WORKFLD-ALPHA.
Function
Checks for a valid integer. This field edit allows for leading and trailing blanks, but not imbedded blanks and non-numeric characters.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the number to be edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Edited field in the COBOL S9(11)V9(7) format or the PL/I (10)9V(4)9T format. |
Edit processing
Function
Checks for a valid integer. This edit allows leading and trailing blanks, but not imbedded blanks and non-numeric characters.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the field being edited). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-NUMERIC |
Result of the edit in the COBOL S9(11)V9(7) format or PL/I (10)9V(4)9T format. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0, and:
Function
Verify that a valid two-character postal state code is entered.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. It must always be 2. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the state code to be checked). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-ALPHA |
Returns the edited field in a 256-byte alphanumeric field. |
Edit processing
Function
Moves a variable-length character field.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the variable-length character field to be moved). |
|
Output |
WORKFLD-VCHAR |
Edited field in a 256-byte (maximum) alphanumeric variable-length character field and the length of the variable-length character field. |
Edit processing
Function
Sets a null indicator based on the contents of a variable-length character field. This edit can be used to check for a blank input field.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Input |
TPI-fieldname-LTH |
Length of the input field. |
|
Input |
TPI-fieldname |
Contents of the TP input buffer (the variable-length field to be checked). |
|
Output |
FIELD-EDIT-ERROR |
Error status of the edit. Possible values are:
|
|
Output |
WORKFLD-VCHAR |
Result of the edit as a 256-byte variable-length alphanumeric field. |
|
Output |
WK-fieldname-NN |
Null indicator variable. |
Edit processing
If the input field is blank, set the null indicator to -1. Otherwise, set the null indicator to 0, and:
Automatic calls to input or output edits, whether CA Telon- or user-supplied, always pass parameters in the order shown in the examples below.
The following code shows an automatic call to an output edit, the CA Telon-supplied DATE output edit routine. DAY is the screen field to receive the edited output.
COBOL
CALL 'ODATE ' USING TPO-DAY
TPO-DAY-LTH,
WORKFLD-NUMERIC.
PL/I
CALL ODATE (TPO_DAY,
TPO_DAY_LTH,
WORKFLD_NUMERIC);
The following code shows the automatic call to an input edit, the CA Telon-supplied DATE input edit routine. DAY is the screen field holding the input to be edited. The edited data is returned to WORKFLD-NUMERIC.
COBOL
CALL 'IDATE ' USING FIELD-EDIT-ERROR TPI-DAY-LTH
TPI-DAY
WORKFLD-NUMERIC.
PL/I
CALL IDATE (FIELD_EDIT_ERROR,
TPI_DAY_LTH,
TPI_DAY,
WORKFLD_NUMERIC);
| Copyright © 2010 CA. All rights reserved. | Email CA about this topic |