vsam.js 3.1.4 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,8 +79,9 @@ See [test/schema.json](https://github.com/ibmruntimes/vsam.js/blob/master/test/s
|
|
|
79
79
|
|
|
80
80
|
- [Supported Data Types](#supported-data-types)
|
|
81
81
|
- [Dataset Schema JSON File](#dataset-schema-json-file)
|
|
82
|
-
- [Open a VSAM dataset](#open-a-vsam-dataset)
|
|
83
82
|
- [Allocate a VSAM dataset](#allocate-a-vsam-dataset)
|
|
83
|
+
- [Open a VSAM dataset](#open-a-vsam-dataset)
|
|
84
|
+
- [VSAM record-level sharing (RLS)](#rls-support)
|
|
84
85
|
- [Check if a VSAM dataset exists](#check-if-a-vsam-dataset-exists)
|
|
85
86
|
- [Close a VSAM dataset](#close-a-vsam-dataset)
|
|
86
87
|
- [Read a record from a VSAM dataset](#read-a-record-from-a-vsam-dataset)
|
|
@@ -150,6 +151,20 @@ var vsamObj = vsam.openSync("VSAM.DATASET.NAME", JSON.parse(fs.readFileSync("sch
|
|
|
150
151
|
* To open a non-empty dataset in read-only mode, specify "rb,type=record" as the third argument.
|
|
151
152
|
* If the dataset doesn't exist, or on error, this function will throw an exception.
|
|
152
153
|
|
|
154
|
+
## VSAM record-level sharing (RLS)
|
|
155
|
+
|
|
156
|
+
To use RLS, the VSAM dataset must have been allocated using IDCAMS utility commands via JCL, ISPF panels, etc., where certain parameters for RLS support must be specified.
|
|
157
|
+
|
|
158
|
+
To open a VSAM dataset in RLS mode in vsam.js, specify, using the "rls=" keyword, the read integrity file access mode in the optional "mode" argument of `openSync`. For example:
|
|
159
|
+
```js
|
|
160
|
+
const vsam = require("vsam");
|
|
161
|
+
const fs = require("fs");
|
|
162
|
+
var vsamObj = vsam.openSync(dsname,
|
|
163
|
+
JSON.parse(fs.readFileSync('path-to-schema.json')),
|
|
164
|
+
"rb,type=record,rls=cr");
|
|
165
|
+
```
|
|
166
|
+
For a list of RLS access modes, see https://www.ibm.com/docs/en/zos/3.2.0?topic=pvio-vsam-record-level-sharing-transactional-vsam.
|
|
167
|
+
|
|
153
168
|
## Check if a VSAM dataset exists
|
|
154
169
|
|
|
155
170
|
```js
|