Pathway/iTS TCP and Terminal Programming Guide
Writing User Conversion Procedures
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide—426751-001
4-6
Screen Output Procedures
•
For the alphanumeric procedure, INTERNAL is a STRING parameter.
INTERNAL^LEN represents the maximum number of bytes that the result of
the conversion can occupy; therefore, the conversion routine should use
INTERNAL^LEN to control the maximum amount of data moved to
INTERNAL.
Screen Output Procedures
Two procedures provide conversion during screen output. One procedure is for output
of numeric data items, and the other is for alphanumeric items. When the USER
CONVERSION clause is declared for the field, the appropriate procedure is called after
standard conversion has completed.
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 output
conversion procedures are shown in Figure 4-3
and Figure 4-4.
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-3. Screen Numeric Output Procedure Declaration
PROC USER^NUMERIC^OUTPUT^CONVERSION ( USERCODE, OUTPUT,
OUTPUT^LEN, MAX^OUTPUT^LEN, INTERNAL,
INTERNAL^SCALE );
INT USERCODE;
STRING .OUTPUT;
INT .OUTPUT^LEN;
INT MAX^OUTPUT^LEN;
FIXED .INTERNAL;
INT INTERNAL^SCALE;
Figure 4-4. Screen Alphanumeric Output Procedure Declaration
PROC USER^ALPHA^OUTPUT^CONVERSION ( USERCODE, OUTPUT,
OUTPUT^LEN, MAX^OUTPUT^LEN, INTERNAL, INTERNAL^LEN );
INT USERCODE;
STRING .OUTPUT;
INT .OUTPUT^LEN;
INT MAX^OUTPUT^LEN;
STRING .INTERNAL;
INT INTERNAL^LEN;