pTAL Guidelines for TAL Programmers

pTAL Guidelines for TAL Programmers527256-002
1-1
1 Overview
This manual gives guidelines for writing programs in the HP Transaction Application
Language (TAL). If you follow these guidelines in your TAL program, you will be able to
convert it to the Portable Transaction Application Language (pTAL) more easily than if
you use all of the TAL features.
Topics:
Why a New Language? on page 1-1
pTAL on page 1-1
Compiling pTAL Programs on page 1-2
Deciding Whether to Convert to pTAL on page 1-3
TAL on page 1-5
Unsupported TAL Features on page 1-6
Restricted TAL Features on page 1-6
Why a New Language?
HP created pTAL to take full advantage of native architecture, which TAL cannot do.
Without the features introduced in pTAL, you must make extensive changes to your
TAL code to compile it to run as a native process. Maintaining a single source program
for both the TNS architecture and native architecture would require very many
conditional include toggles.
pTAL
pTAL enables you to make a relatively small number of changes to existing TAL source
code and compile the modified source code to produce either TNS object code
or
native object code
. A TAL program can run as a native process only by running TNS
object code or accelerated object code. The native compiler produces object code that
is further optimized for native architecture than accelerated object code is.
pTAL:
Does not have constructs that depend on TNS architecture
Has constructs that replace TAL constructs that are not supported in pTAL
Adds new constructs that enable the native compiler to produce optimal native
object code
Most pTAL programs can also be compiled by a D40 or later TAL compiler and
executed as TNS processes.