Hitachi MK-96RD647-01 manual Acquiring Dataset Attributes, DatasetGetFileInformation Function

Models: MK-96RD647-01

1 226
Download 226 pages 34.71 Kb
Page 162
Image 162

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-6shows the datasetGetFileInformation arguments and return values.

Table 6-6

DatasetGetFileInformation Function

 

 

 

 

 

Item

 

Value

Type

Description

 

 

 

 

 

Argument

 

pathnam

char *

VSN:Dataset name

 

 

e

 

VSN = 6-character volser.

 

 

 

 

Volume must be listed in volume definition file.

 

 

 

 

Delimiter = : (colon, no spaces)

 

 

 

DATASET_FIND_DATA

Dataset name: 44 characters max, no spaces.

 

 

ffd

Area where the dataset attribute information is stored.

 

 

 

 

 

 

 

 

 

Return value

 

0

 

Normal end

 

 

-1

 

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.

6-8

Performing File Access Library (FAL) Operations

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

Page 162
Image 162
Hitachi MK-96RD647-01 manual Acquiring Dataset Attributes, DatasetGetFileInformation Function, Delimiter = colon, no spaces