NonStop NS-Series Database Migration Guide

Migrating SQL/MP, SQL/MX, and Enscribe
Applications
HP Integrity NonStop NS-Series Database Migration Guide540469-001
4-6
TAL Programs That Contain Embedded SQL/MP
Statements
TAL Programs That Contain Embedded SQL/MP Statements on page 4-6
pTAL Programs That Call Embedded SQL/MP Routines on page 4-6
Object Name References and Resolution on page 4-6
SQL Compilation on page 4-7
TAL Programs That Contain Embedded SQL/MP Statements
As you can with other TNS object files, you can usually interpret TAL programs on
TNS/E systems without recompiling the source code. After migrating TAL programs to
a TNS/E system, you can run the OCA on the TNS/E system to optimize the object
files. For more information, see the Object Code Accelerator (OCA) Manual.
However, for greater performance gains, HP recommends that you convert TNS
applications to native mode. To produce native object code, convert your TAL
programs to pTAL. For more information, see the TNS/E Native Application Conversion
Guide and the pTAL Conversion Guide.
pTAL does not support embedded SQL/MP statements. To convert a TAL program
with embedded SQL/MP to pTAL, write C functions that contain the embedded
SQL/MP statements and call the C functions from pTAL. For more information, see the
SQL/MP Programming Manual for C.
pTAL Programs That Call Embedded SQL/MP Routines
On TNS/R systems, pTAL programs contain TNS/R native object code that cannot be
run on TNS/E systems. To migrate pTAL programs to TNS/E systems, you must
compile the pTAL source code into TNS/E native object code by using the EpTAL
compiler in the ETK or on the TNS/E system. For more information, see the pTAL
Reference Manual.
The C routines that contain embedded SQL/MP statements are TNS/R native object
files that cannot be run on TNS/E systems. You must compile the C source code into
TNS/E native object code in the ETK or on the TNS/E system. For more information,
see the SQL/MP Programming Manual for C.
You might need to make some minor changes to the source code before compilation.
For details on required source code changes, see the H-Series Application Migration
Guide.
Object Name References and Resolution
Embedded SQL/MP programs refer to SQL/MP database objects by their Guardian file
names or DEFINE names. Verify that the Guardian file names in the source code or in
DEFINE name mappings do not specify the node name, which might change when you
move the database to an Integrity NonStop NS-series (or any new) system. If
necessary, omit or change the node name in the source code and then recompile on