Guardian Application Conversion Guide

Converting Basic Elements of a TAL Program
Converting TAL Applications
096047 Tandem Computers Incorporated 3–5
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 file-name variables as described in the following
paragraphs.
The C-series-compatible interface uses file names that have an internal format, have a
fixed length of 12 words, and are fully qualified. Unconverted programs that interact
with users typically:
1. Accept an external form of file name.
2. Convert the file name to uppercase.
3. Pass the uppercase file name to the FILENAMEEXPAND procedure, which
returns the internal format.
4. Pass the result to a C-series-compatible system procedure.
Programs that use the D-series enhanced interface can, in most cases, take a name and
pass it directly to the Guardian procedure, which handles case shifting and defaulting.
If file-name manipulation is necessary, the D-series enhanced interface has procedures
to do the manipulation for you.
Disk File Names. Your existing program might declare a Guardian disk-file-name
variable. The largest D-series disk file name are:
For permanent files 35 bytes (one byte larger than the external form of a
C-series network file name)
For temporary files 26 bytes (4 bytes larger than the external form of a
C-series network file name)
When accessing Guardian disk files on remote D-series systems in a network, a
converted program can use a D-series network disk file name with an eight-character
volume name (one to seven characters after the dollar sign). A C-series network disk
file name allows a maximum of six characters after the dollar sign in the volume name.
Therefore, if you want to take advantage of this extension, you must declare your
network file-name variables large enough to include this extra character. To ensure
that your declaration is long enough, use the ZSYS^VAL^LEN^FILENAME LITERAL
(47 bytes) from the ZSYSTAL file. For example:
STRING .employee[0:34] :=
["\newyork.$payroll.july1990.employee"];
STRING .managers[0:ZSYS^VAL^LEN^FILENAME-1] :=
["\newyork.$disk4.level2.managers "];