Acquiring dataset attributes -8, Acquiring dataset attributes), Acquiring dataset attributes – HP XP20000XP24000 Disk Array User Manual

Page 162

Advertising
background image

6-8

Performing File Access Library (FAL) Operations

Hitachi USP V Cross-OS File Exchange User’s Guide

Acquiring Dataset Attributes

FAL provides several functions for acquiring the complete dataset attribute
information for one or more datasets: datasetGetFileInformation,

datasetFindFirstFile, datasetFindNextFile, and datasetFindClose. The
dataset attribute information returned by these functions contains:

typedef struct

DATASET

_FIND_DATA {

unsigned short blockSize;

/* Block length

*/

unsigned short recordSize;

/* Record length

*/

unsigned char dsorg[2];

/* dataset type

*/

unsigned char recfm; /* record format

*/

char name[44];

/* dataset name

*/

unsigned short lastBlockTt; /* last block address (relative track number) */
unsigned char lastBlockR;

/* last block address (relative record number)*/

} DATASET_FIND_DATA;

Acquiring Attribute Information for a Specific Dataset

datasetError = datasetGetFileInformation (pathname, &ffd)

The datasetGetFileInformation function acquires the attribute information
for the dataset specified by pathname and returns the data into ffd.

Table 6-6 shows the datasetGetFileInformation arguments and return
values.

Table 6-6

DatasetGetFileInformation Function

Item Value

Type

Description

Argument

pathnam
e



ffd

char *



DATASET_FIND_DATA

VSN:Dataset name

VSN = 6-character volser.
Volume must be listed in volume definition file.
Delimiter = : (colon, no spaces)
Dataset name: 44 characters max, no spaces.

Area where the dataset attribute information is stored.

Return value 0

-1

Normal end

Error end

When the DatasetGetFileInformation function terminates successfully, it
returns a value of 0. If it terminates unsuccessfully, it returns a value of -1. To
get the error code information, execute the datasetGetLastError function
(see section Acquiring Error Information).

The DatasetGetFileInformation function has the following restriction:

The DatasetGetFileInformation function cannot be used on an open
dataset. Use this function before opening or after closing the dataset.

Advertising