Guardian Application Conversion Guide

Managing Your Disk Files
Converting Other Parts of an Application
096047 Tandem Computers Incorporated 8–9
Refreshing a Disk Volume
Your existing program might call the REFRESH procedure to refresh a disk volume:
CALL REFRESH (volume^name);
Convert your program to call the DISK_REFRESH_ procedure. DISK_REFRESH_
writes control information from the file control blocks (FCBs) to the disk volume. It
should be used only before the disk volume is brought down (for example,
immediately before a cold load).
DISK_REFRESH_ requires a string for the disk name rather than the 12-word internal-
format name. The length of the name is specified by a separate integer parameter. In
this example, DISK_REFRESH_ refreshes the disk volume indicated by the
volume^name
parameter:
error := DISK_REFRESH_(volume^name:volume^name^length);
Getting Information About a Disk Volume or File
Your existing program might call one of these procedures to get information about a
disk file or volume:
DEVICEINFO FILEINFO
DEVICEINFO2 FILEINQUIRE
DISKINFO FILERECINFO
Convert your program to call the FILE_GETINFO_ , FILE_GETINFOLIST_ ,
FILE_GETINFOBYNAME_ , or FILE_GETINFOLISTBYNAME_ procedure.
FILE_GETINFO_ and FILE_GETINFOLIST_ accept a file number of an open file, while
FILE_GETINFOBYNAME_ and FILE_GETINFOLISTBYNAME_ accept a file name to
identify the file.
To specify the information that FILE_GETINFOLIST_ or
FILE_GETINFOLISTBYNAME_ returns, you set item codes in an
item^list
array.
Each integer item code represents a file characteristic. Both procedures return the
corresponding file information in a
results
array in the same order specified in the
item^list
array.
The ZSYSDDL file contains LITERAL declarations that you can use with the
item^list
array. To use these declarations, include the appropriate file (ZSYSTAL,
ZSYSCOB, ZSYSC, or ZSYSPAS) with your source code file.
If you call FILE_GETINFOBYNAME_ in a waited manner, the system returns the
information in the procedure output parameters. However, if you call this procedure
in a nowait manner, the system returns the information in system message -108
(nowait FILE_GETINFOBYNAME_ completion). Refer to the Guardian Procedure
Errors and Messages Manual for the description and format of this message.