COBOL Manual for TNS/E Programs (H06.03+)
Program Compilation
HP COBOL Manual for TNS/E Programs—520347-003
11-66
PORT and NOPORT
PORT
aligns BINARY/COMPUTATIONAL data items on byte boundaries (unless they are
described with the SYNCHRONIZED clause, which aligns them on 2-byte
boundaries).
PORT also allows the CALL statement in a program to behave as it does in
X/Open and XPG4; that is, to call non-COBOL routines, pass parameters by value,
and return the values of functions.
1
•
Allows CALL to call programs other than COBOL programs
•
Prevents the compiler from issuing a warning when the Linkage Section
does not having a matching item in the PROCEDURE DIVISION header
•
Causes the external variable RETURN-CODE to be automatically defined
2
prevents binary items from being aligned on word boundaries.
3
does what both PORT 1 and PORT 2 do. PORT 3 is equivalent to PORT.
NOPORT
aligns BINARY/COMPUTATIONAL data items according to standard alignment
rules and prevents the CALL statement in a program from calling non-COBOL
routines, passing parameters by value, and returning the values of functions.
Usage Considerations:
•
NATIVE-n Data Items and Pointers
The PORT directive does not affect the alignment of NATIVE-n data items or
pointers.
•
Run-Time Performance
The PORT directive can severely impact n HP COBOL program’s run-time
performance.
Default: NOPORT
Placement: Anywhere
Scope: Applies to the compilation unit
Dependencies: None










