Extract DSN Dataset Name from JCL Job Control Language
v1.1.0
Want to use in your codebase? Import via 'require'
const dsn = require('dsn-from-jcl')
const sample = '//INFILE DD DSN=TZSP.MY.FILE,DISP=SHR' // lines of valid JCL, separated by newline characters
const result = dsn.extractFromString(sample, 'TZSP')
console.log(result) // expect [ 'TZSP.MY.FILE' ]
Want to run in interactive mode? Run npm start
or node script.js
.
*** EXTRACT DSN FROM JCL, INTERACTIVE MODE ***
1) your input file path? > ./spec/input.txt
2) your output path?> myoutput.txt
3) 1st DSN qualifier to search for? > TZSP
RESULT:
[ 'TZSP.SOME.FILE', null, 'TZSP.EXTRA.FILE.HERE' ]
- Returns an array containing valid DSNs that begin with the given qualifier for each line in the given text.
- Behaves similarly to
extractFromString
, but reads data from the given file on disk.
No build dependencies.
- Install test dependencies via
npm install
- Run unit test suite via
npm test
Coded with <3 by Jonathan Lopez