Open Dataset

Format:

datasetError=dataset_Open(global,g_error,devname,dsname,voltype, mode)

Table 6-13 Arguments, Types and Descriptions for Open Data Set

Argument

Type

Description

 

 

 

global

void (see Note 1)

Global memory area

g_error

long (see Note 1)

An error information stored area

devname

char (see Note 1)

raw device name

dsname

char (see Note 1)

dataset name

voltypr

char (see Note 1)

volume emulation type

mode

char (see Note

open mod

Return value: datasetError

1)

Abnormal end

 

-1

long

 

 

 

 

 

 

Note 1: When you issue this function, you must issue dataset_ Close() in the end process.

Note 2: You must issue this function before dataset_Open(), Get(), dataset_Get2(), dataset_Put(), dataset_Put2(), dataset_Rewind(), and dataset_GetFileInformation().

This function opens a specified dataset (file) with a specified open mode.

Argument:

global: global memory area (specify a Global memory area gotten by dataset_AllocGlobal)

g_error: Specify an address to store FAL error code.

devname: raw device name (special file)

dsname: dataset name

voltype: Device emulation type (3390-3A/9A/LA,and 3390-3B/9B/LB, 3380-3A, 3380-3B)

mode:

“r”: Read only

“w”: Write only

Return Value: When this function ends abnormally, it returns -1.

Example:

 

void *memptr;

/* global memory area */

 

long err,datasetError;

/* global err information */

6-20

Performing File Access Library (FAL) Operations

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

Page 174
Image 174
Hitachi MK-96RD647-01 manual Open Dataset, Arguments, Types and Descriptions for Open Data Set, Mode