Pathway/iTS TCP and Terminal Programming Guide

Writing User Conversion Procedures
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
4-2
User-Written User Conversion Procedures
CONVERSION clause as part of either a field definition or a SEND MESSAGE
statement.
User-Written User Conversion Procedures
You can write your own user conversion procedures in the Portable Transaction
Application Language (pTAL) and use the nld utility to link your procedures in the
native TCP user library object file, PATHTCPL.
In releases prior to D40, user conversion procedures were written in TAL. In D40 and
later releases (including all G-series releases), user conversion procedures must be
written in pTAL. pTAL is based on TAL. The pTAL language excludes architecture-
specific TAL constructs and includes new constructs that replace the architecture-
specific constructs. You can write user conversion procedures that can be compiled by
both the TAL and the pTAL compilers, thus enabling you to use the same source code
for different releases of Pathway/iTS.
If you are converting existing user-written user conversion routines to pTAL for use
with a D40 or later version of Pathway/iTS, refer to the pTAL Conversion Guide and the
pTAL Reference Manual for further information. Many user conversion routines are
simple enough that no changes will be needed. However, there is an interface change in
the four user conversion procedures for intelligent devices, as shown in Figure 4-7
and
Figure 4-8 later in this section.
User conversion routines and alternative advisory message routines (described in the
Compaq NonStopPathway/iTS SCREEN COBOL Reference Manual) are the only
routines that must be compiled with the pTAL compiler.
Coding the User Conversion Procedures and Creating the User Library
There are four files provided in the installation subvolume:
You should code the user conversion procedures only in the TLIB file.
Use the following four steps to code your user conversion procedures:
1. Copy the files SLIB, ILIB, and TLIB from the installation subvolume to your
subvolume: for example, $MY.USERCNV. Make changes to the user conversion
procedures that you want to use.
SLIB An auxiliary source file that is passed to the pTAL compiler for
compiling the user conversion procedures
ILIB An interface source file containing all the definitions and data
structures used by the user conversion procedures
TLIB A source file containing the stubs of the user conversion
procedures
TCPLIB An object file that is required to build the native user library