pTAL Reference Manual (H06.03+)
Compiler Directives
HP pTAL Reference Manual—523746-005
17-11
Migrating from TNS/R to TNS/E
A USEGLOBALS compilation (Example 17-10 on page 17-11) then produces object file
newobj and retrieves global data declarations and initialization from ptalsym and
global initializations from myobj. When USEGLOBALS is active, the compiler ignores
text lines and SOURCE directives until BEGINCOMPILATION appears in the source
file.
You can check the syntax of global data declarations before saving them, as in
Example 17-11 on page 17-11.
After you correct any errors, you can recompile myprog as in Example 17-12 on
page 17-11.
Migrating from TNS/R to TNS/E
The EpTAL compiler does not accept the SAVEGLOBALS and USEGLOBALS
directives.
To migrate a pTAL program that uses SAVEGLOBALS and USEGLOBALS from TNS/R
to TNS/E:
1. Remove SAVEGLOBALS from the SAVEGLOBALS compilation command line.
2. Compile the file from Step 1 using the EpTAL compiler, omitting SAVEGLOBALS
from the compilation command.
3. Remove USEGLOBALS from each USEGLOBALS compilation command line.
You can leave BEGINCOMPILATION in this file. The EpTAL compiler ignores
BEGINCOMPILATION, and you need BEGINCOMPILATION if you want to compile
the same files using the pTAL compiler.
4. Compile each file from Step 3 using the EpTAL compiler, omitting USEGLOBALS
from each compilation command.
If all files compile without errors, the migration is done. (To compile the same files
using the pTAL compiler, specify SAVEGLOBALS in the SAVEGLOBALS compilation
command and USEGLOBALS in each USEGLOBALS compilation command.)
Example 17-10. Retrieving Global Data Declarations and Data Initializations
pTAL /IN myprog/ newobj; USEGLOBALS ptalsymj
Example 17-11. Checking the Syntax of Global Data Declarations
pTAL /IN myprog/; SAVEGLOBALS ptalsym, SYNTAX
Example 17-12. Recompiling MYPROG After Correcting Errors
pTAL /IN myprog/; USEGLOBALS ptalsym










