Prompted by Colin Paice’s recent blog post on bringing your JCL out of the 1960s, I thought I would write this post about a new feature of JCL I recently discovered.
I am quite comfortable creating/editing JCL, but one thing I do hate with a passion is long PARM strings. I can never remember quite which column the continuation line is supposed to start on, and it just makes your parameters hard to read too. You may have noticed a number of features in our recently provided products on z/OS which help to keep PARM strings short.
When testing our recently released QLOAD on z/OS, where there simply are times when you need long PARM strings, I came across a recently added JCL feature called PARMDD. I believe it was added in z/OS 2.1.
Instead of coding the PARM parameter on an EXEC statement inline, this instead allows you to point it to a DD card where you have then have as many lines of parameters as you need. These various lines are stripped of their trailing white space, concatenated together and then passed to your program. You can have this DD card point to a file, but I like to have the parameters inline in the same JCL file.
Here’s an example of one such long parameter when using the QLOAD delimited file feature.
//QLOAD JOB //********************************************************************* //* QLOAD Load Delimited File //********************************************************************* //DELIMQL EXEC PGM=QLOAD,PARMDD=PARMS //PARMS DD * -m MQG1 -o Q1 -Cd -f"DD:DELIM" -nF -n"is:<msg>" -n"ie:</msg>" -n"ip:<usr>" -n"iq:</usr>" /* //STEPLIB DD DSN=GEMUSER.USER.LOAD,DISP=SHR // DD DSN=IBM.MQ.SCSQAUTH,DISP=SHR // DD DSN=IBM.MQ.SCSQANLE,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //DELIM DD DSN=GEMUSER.MSGFILES(EXMPL1),DISP=SHR //MQGEML DD DSN=GEMUSER.MQGEM.LIC,DISP=SHR //
Now isn’t that so much easier to use and to read, than your standard continuation PARM parameter?
If you want to give this JCL feature a try, I think you just need to be on at least z/OS 2.1, and I’ve provided the link to the JCL Reference above.
You can download QLOAD for z/OS from the QLOAD Download Page. If you’d like to try out QLOAD on z/OS, please email support@mqgem.com and a 1-month trial licence will be sent to you.
In pursuit of being more modern, I’m currently seeing how far I can get with ditching TSO, using git to store JCL, Python (with Jinja2 templating) to modularise JCL snippets all managed in USS via an SSH session (so command line). Once I get ZOAU installed, Mike Fulton (https://makingdeveloperslivesbetter.wordpress.com/) is going to be badgering me to leave JCL behind too!
Refs
– git (from Rocket) This page in the DBB KC is a good place to start https://www.ibm.com/support/knowledgecenter/SS6T76_1.0.4/setup_git_on_uss.html
– Python, IBM’s 3.8 https://www.ibm.com/support/knowledgecenter/SSCH7P_3.8.0/welcome.html
– ZOAU – IBM Z Open Automation Utilities – https://www.ibm.com/support/knowledgecenter/SSKFYE_1.0.3/welcome_zoautil.html
LikeLike
Thanks Ian. Very interesting.
LikeLike
Hello! I was about to write a post on PARMDD on my blog and came across this post. Thanks for writing! Great article!
LikeLike
Pingback: Using a long TSO command from batch is easy – ColinPaice