Guardian Application Conversion Guide
Converting Basic Elements of a COBOL85 Program
Converting COBOL85 Applications
4–4 096047 Tandem Computers Incorporated
Declaring and Checking File-System Error Numbers
A Guardian procedure can return a file-system error number in the GIVING phrase of
an ENTER statement to report an error or special condition. Similarly, the
COBOLFILEINFO utility routine is capable of returning a file-system error code. You
might need to convert the parts of your program that declare and process file-system
errors.
For example, your program might declare a three-digit data item for a file-system error
number:
* C-series file-system error number.
01 ERROR-NUMBER PIC S9(3) COMPUTATIONAL.
Declare file-system error numbers as five-digit data items:
* D-series file-system error number.
01 ERROR-NUMBER PIC S9(5) COMPUTATIONAL.
You can also declare a data item for a file-system error number using the
USAGE IS NATIVE-2 clause.
Your program might include a routine that assumes a maximum value for a
file-system error number (for example, 255). A D-series file-system error number is a
maximum of 16 bits. Therefore, make sure that your routine does not exclude any new
error numbers. Also, because Tandem might define additional error numbers in
future releases, do not consider currently undefined numbers as invalid.
For a list and description of all file-system error numbers, refer to the Guardian
Procedure Errors and Messages Manual.
Using Guardian File Names
Guardian file names include disk file names, device names (such as a printer or
terminal name), and process file names. You might need to convert the parts of your
program that declare and use these names.
Disk File Names. Your existing program might declare a Guardian disk-file-name data
item. The largest C-series fully qualified disk file name is 34 characters:
* Fully qualified C-series disk file name.
01 C-DISK-FILE-NAME PIC X(34).
When accessing disk files on other D-series systems in a network, a converted
COBOL85 program can use a remote D-series file name with an eight-character
volume name (seven characters after the dollar sign) in:
A SELECT clause in the FILE-CONTROL paragraph
A FILE clause in the SPECIAL-NAMES paragraph