Guardian Application Conversion Guide
Managing Your Disk Files
Converting Other Parts of an Application
8–6 096047 Tandem Computers Incorporated
Upshifting ASCII Strings
Your existing program might call the SHIFTSTRING procedure to upshift all
alphabetic characters in an ASCII string:
CALL SHIFTSTRING (file^name^string,
string^length,
shift^param); ! Value = 0 (upshift).
You might want to convert your program to call the STRING_UPSHIFT_ procedure.
This procedure uses both an input and output parameter for the string, which allows
you to preserve the unshifted version of the string. For ASCII strings, the output
parameter has the same length as the input parameter. For example:
error := STRING_UPSHIFT_(in^string:in^string^length,
out^string:max^length);
Using Both C-Series and D-Series File Names
If you convert your program, it might still contain file names in the C-series 12-word
internal format. To convert file names between the C-series and D-series formats, use
the procedures described below.
Use the FILENAME_TO_OLDFILENAME_ procedure to convert a D-series file-name
string to a C-series 12-word internal-format file name:
STRING .d^name[0:ZSYS^VAL^LEN^FILENAME - 1];
INT .c^name[0:11];
...
error := FILENAME_TO_OLDFILENAME_(d^name:name^length,
c^name);
Use the OLDFILENAME_TO_FILENAME_ procedure to convert a C-series 12-word
internal-format file name to a D-series file-name string:
STRING .d^name[0:ZSYS^VAL^LEN^FILENAME - 1];
INT .c^name[0:11];
...
error := OLDFILENAME_TO_FILENAME_(c^name,
d^name:max^length,
name^length);
The converted D-series name is always fully qualified (including the node name).