Pathway/iTS TCP and Terminal Programming Guide
Writing User Conversion Procedures
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide—426751-001
4-13
Intelligent Device Output Procedures
INTERNAL
is where the TCP expects to find the results of the conversion routine; that is, it is
the destination of the data from the INPUT parameter—of length INPUT^LEN—
that the conversion routine has processed.
INTERNAL^SCALE
is a parameter in the numeric procedure only. The procedure should set it to the
number of decimal places of the value stored in INTERNAL when it is a FIXED
field.
INTERNAL^LEN
is the size of the destination buffer INTERNAL. It is set to the length of the
maximum expected reply message for the current SEND MESSAGE operation. The
conversion routine should use INTERNAL^LEN to control the maximum amount of
data moved into INTERNAL, the destination of the conversion operation.
FILL^CHAR
is always set to either 0 (for numeric conversions) or blank (for alphanumeric
conversions) by the TCP.
FILL^OFF
is always set to -1 by the TCP.
RIGHT^JUSTIFIED
contains -1 (TRUE) if an alphanumeric value is to be right justified and contains 0
(FALSE) if not.
FIELD^RETURNED
should be set to -1 (TRUE) if any data was sent from the device or be set to 0
(FALSE) if there was no data.
FIELD^PRESENT
should be set to -1 (TRUE) if the data sent from the device is nonblank or be set to 0
(FALSE) if the data is blanks.
Intelligent Device Output Procedures
Two procedures can be called to convert output being sent to an intelligent device: one
procedure to convert numeric output and the other to convert alphanumeric output.
You can use the output procedures to:
•
Add fill characters to the message, increasing the length up to the maximum
message length allowed
•
Right justify alphanumeric data in the message