Guardian Application Conversion Guide

Managing Your Disk Files
Converting Other Parts of an Application
096047 Tandem Computers Incorporated 8–7
Maintaining Disk Files and
Volumes
The D-series operating system provides new file-system procedures to maintain disk
files and volumes, including:
Creating, renaming, and purging disk files
Refreshing a disk volume
Getting information about disk files and volumes
These topics are described in the following paragraphs.
Creating a New Disk File
Your existing program might call the CREATE procedure to create a new permanent
or temporary disk file:
CALL CREATE (disk^file,
primary^ext^size,
file^code,
secondary^ext^size,
file^type,
record^length);
Convert your program to call the FILE_CREATE_ or FILE_CREATELIST_ procedure
to create a permanent or temporary disk file.
FILE_CREATE_ and FILE_CREATELIST_ require a string for the
filename
parameter rather than the 12-word internal-format file name.
For a permanent file, the input
filename
parameter must contain the new file name.
If the name is incomplete, both procedures use the current settings, including the node
name, from the =_DEFAULTS DEFINE for the unspecified parts.
For a temporary file, the input
filename
parameter contains the name of the volume
on which the system creates the temporary file. The system returns the length of the
new temporary file name in a separate integer parameter.
FILE_CREATELIST_ also accepts an array of file attributes and values to specify
characteristics for a file. For example, you can set alternate-key characteristics for an
alternate-key file at the time of creation. The ZSYSDDL file contains LITERAL
declarations that you can use with the FILE_CREATELIST_ parameters, including the
array of file attributes. To use these declarations, include the appropriate file
(ZSYSTAL, ZSYSCOB, ZSYSC, or ZSYSPAS) with your source code file.
In this example, FILE_CREATE_ creates a file named
new^file
:
error := FILE_CREATE_(new^file:max^length,
new^file^length,
file^code,
primary^ext^size,
secondary^ext^size,
max^extents,
file^type);