Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCL Message class support #3340

Open
wants to merge 5 commits into
base: v2.x/staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bin/commands/start/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ sanitize_ha_instance_id
if [ -n "${ZWE_CLI_PARAMETER_HA_INSTANCE}" ]; then
route_sysname=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".haInstances.${ZWE_CLI_PARAMETER_HA_INSTANCE}.sysname")
fi
msgclass=
if [ -z "${msgclass}" ]; then
jobname=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.job.msgclass")
fi

###############################
# start job
Expand All @@ -58,6 +62,9 @@ fi
if [ -n "${route_sysname}" ]; then
cmd="RO ${route_sysname},${cmd}"
fi
if [ -n "${msgclass}" ]; then
cmd="${cmd},MSGCLASS=${msgclass}"
fi
result=$(operator_command "${cmd}")
code=$?
if [ ${code} -ne 0 ]; then
Expand Down
6 changes: 6 additions & 0 deletions bin/commands/start/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export function execute() {
securityStcsZowe=std.getenv('ZWE_PRIVATE_DEFAULT_ZOWE_STC');
}

//Read job message class
const msgclass = zoweConfig.zowe.job?.msgclass;

let routeSysname:string;

config.sanitizeHaInstanceId();
Expand All @@ -50,6 +53,9 @@ export function execute() {
if (routeSysname) {
cmd=`RO ${routeSysname},${cmd}`;
}
if (msgclass) {
cmd+=`,MSGCLASS=${msgclass}`;
}

const shellReturn = zoslib.operatorCommand(cmd);
if (shellReturn.rc) {
Expand Down
2 changes: 2 additions & 0 deletions example-zowe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ zowe:
name: ZWE1SV
# Prefix of component address space
prefix: ZWE1
# Zowe JCL job message class
msgclass: "5"

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# This is an ID you use to separate multiple Zowe installs when determining
Expand Down
4 changes: 4 additions & 0 deletions schemas/zowe-yaml-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,10 @@
"prefix": {
"type": "string",
"description": "A short prefix to customize address spaces created by Zowe job."
},
"msgclass": {
"type": "string",
"description": "Message class for Zowe job."
}
}
},
Expand Down
Loading