Open (Dataset function)

From m204wiki
Jump to: navigation, search

Open this dataset (Dataset class)


This function opens the dataset associated with a Dataset object.

Syntax

[%rc =] dataset:Open

Syntax terms

%rc A variable to receive the return code from the Open method, indicating whether or not the open succeeded.

Possible return codes are:

0 Open is successful.
1 Generic failure.

One likely cause of this is that another user has the dataset open, currently.

3 Stream or dataset not defined, or access not allowed.
14 Insufficient virtual storage for buffers or control blocks.
15 Parallel stream has incompatible parallel members.
dataset A variable containing a reference to a Dataset object for which the underlying dataset is to be opened.

Usage notes

  • An Open can modify the BlockSize, RecordLength, RecordFormat, or NumberOfBuffers properties. This is especially likely for input datasets where the dataset attributes from the DSCB (or CMS or VSE equivalents) will tend to override attributes set explicitly before the open.
  • An Open of a dataset or stream usually places an exclusive lock on the dataset or stream until it is closed. This means no other thread can access the dataset while it is opened.

See also