COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
functions, not constructs that are peculiar to HP C++ (such as member functions and
templates).
• Restrictions on Calling pTAL Routines
If your HP COBOL program calls a TAL or pTAL routine that has a string:length parameter,
you only need to give the name of the corresponding actual parameter, because the compiler
can determine its length.
If a TAL or pTAL routine that has a string:length parameter does not ignore trailing spaces and
you want to pass it an actual parameter that is shorter than the one defined for the
corresponding formal parameter, use reference modification.
The HP COBOL code in Example 87 calls the ppTAL routine FILENAME_COMPARE_, which
does not ignore trailing spaces and has two formal parameters, filename1:length1 and
filename2:length2.
Example 87 Calling a pTAL Routine That Does Not Ignore Trailing Spaces
01 file-name-1 PIC X(255).
01 file-name-2 PIC X(255).
01 len-1 PIC 999 COMP.
01 len-2 PIC 999 COMP.
...
MOVE 0 TO len-1, len-2
INSPECT file-name-1 TALLYING len-1
FOR CHARACTERS BEFORE SPACE
INSPECT file-name-2 TALLYING len-2
FOR CHARACTERS BEFORE SPACE
ENTER "FILENAME_COMPARE_" USING file-name-1 (1: len-1)
file-name-2 (1: len-2)
GIVING ...
ENTER COBOL
HP COBOL compilers treat ENTER COBOL as a comment. In implementations that use ENTER to
mark the beginning of an embedded routine in a language other than COBOL, the ENTER COBOL
statement ends the embedded routine and the resumption of COBOL source code.
EVALUATE
EVALUATE defines a multiple-branch structure, a decision table. EVALUATE executes a different
group of statements when one or more data items or expressions have certain sets of values.
ENTER COBOL 323










