Skip to content

Instantly share code, notes, and snippets.

@dkelosky
Created December 18, 2018 13:25
Show Gist options
  • Save dkelosky/765717a49d18f054ce53c97d4e10869f to your computer and use it in GitHub Desktop.
Save dkelosky/765717a49d18f054ce53c97d4e10869f to your computer and use it in GitHub Desktop.
#! /bin/env node
import * as config from "config";
import { execSync } from "child_process";
import { DataSets } from "./doc/IDataSets";
const hlq: string = config.get<string>('settings.hlq');
const dataSets: DataSets = config.get<DataSets>('dataSets');
Object.keys(dataSets).forEach((key) => {
const cmd = `zowe files create pds ` +
`"${hlq}.${key}" ` +
`--bs ${dataSets[key].blockSize} ` +
`--db ${dataSets[key].directoryBlocks} ` +
`--rf ${dataSets[key].recordFormat} ` +
`--rl ${dataSets[key].recordLength} ` +
`--dt ${dataSets[key].recordLength} ` +
`--sz ${dataSets[key].size}`;
console.log(cmd)
const resp = execSync(cmd).toString();
console.log(resp.toString())
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment