TNS/R Native Application Migration Guide
COBOL85 Migration Tasks
TNS/R Native Application Migration Guide—523745-001
4-3
Migrating COBOL85 Programs
•
Data Alignment
The COBOL85 and NMCOBOL compilers generate code with the same data
alignment. You need not change any data alignment directives before
migrating a TNS COBOL85 program to native COBOL85. You need not
regenerate Data Definition Language (DDL) source files that TNS COBOL85
and native COBOL85 programs share.
By default, the TNS compilers for C, C++, and TAL generate code with different
data alignment than the corresponding native compilers for C, C++, and pTAL.
To migrate a TNS C, TNS C++, or TAL program to native mode, you must do
one of the following:
°
If DDL was not used, use SHARED2 pragmas in pTAL programs and
CSHARED2 pragmas in native C programs.
°
If DDL was used, regenerate DDL source files that TNS and native
programs share.
DDL adds pragmas to ensure that all compilers generate code with the
same data alignment. For more information, see Section 7, Data Definition
Language (DDL) Migration Tasks.
5. If you want to put the routines that you converted to native mode in Step 4 in a
native user library (instead of in a TNS user library, which your program can no
longer use), follow the directions in the COBOL85 for NonStop Systems Manual.
6. Compile your source program with the NMCOBOL compiler. For instructions, see
the COBOL85 for NonStop Systems Manual.
The NMCOBOL compiler needs more symbol table space than the COBOL85
compiler does. If the NMCOBOL compilation fails due to dictionary overflow, use
the PARAM SYMBOL-BLOCKS command to increase the space available for the
symbol table, local label table, and embedded SQL statements and then recompile.
The maximum value of the PARAM SYMBOL-BLOCKS command’s count
parameter is 25 for the NMCOBOL compiler (compared to 14 for the COBOL85
compiler).
7. Run the COBOL85 program that you compiled in Step 6.
8. If necessary, debug the program.
The Inspect interactive symbolic debugger and the Debug machine-oriented
debugger handle native processes slightly differently than TNS processes. The
debuggers have environment registers for TNS processes, but not for native
processes; therefore, variables might remain in memory and never be written to
memory—it depends on compiler optimization level.