Pathway/iTS TCP and Terminal Programming Guide
Writing User Conversion Procedures
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide—426751-001
4-4
Restrictions on User Conversion Procedures
Restrictions on User Conversion Procedures
Do not code your user conversion procedures to perform any I/O operations. Such I/O
operations could interfere with the operation of the TCP.
Screen Input Procedures
Two procedures provide conversion during screen input, one procedure for input of
numeric data items and the other for input of alphanumeric items. When the USER
CONVERSION clause is declared for the field, the appropriate procedure is called:
•
Before value checks are applied
•
After the input has been stripped of fill characters
•
After standard conversion is attempted
The procedure is called even if an error occurs during the standard conversion attempt;
if a length error occurs, however, the procedure is not called.
Most of the parameters of the two procedures are the same; they differ only for the
internal data item. Declarations for the numeric and alphanumeric screen input
conversion procedures are shown in Figure 4-1
and Figure 4-2.
Note. If an alphanumeric field is declared with the UPSHIFT and USER CONVERSION
clauses, the TCP upshifts the field both before and after the user conversion procedure is
called.
Figure 4-1. Screen Numeric Input Procedure Declaration
PROC USER^NUMERIC^INPUT^CONVERSION ( USERCODE, ERROR,
INPUT, INPUT^LEN, INTERNAL, INTERNAL^SCALE );
INT USERCODE;
INT .ERROR;
STRING .INPUT;
INT INPUT^LEN;
FIXED .INTERNAL;
INT INTERNAL^SCALE;
Figure 4-2. Screen Alphanumeric Input Procedure Declaration
PROC USER^ALPHA^INPUT^CONVERSION ( USERCODE, ERROR,
INPUT, INPUT^LEN, INTERNAL, INTERNAL^LEN );
INT USERCODE;
INT .ERROR;
STRING .INPUT;
INT INPUT^LEN;
STRING .INTERNAL;
INT INTERNAL^LEN;