JCL with long PARM strings

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 Load Delimited File
//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                           
//SYSOUT   DD SYSOUT=*      

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.


4 thoughts on “JCL with long PARM strings

  1. 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!

    – 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


  2. Pingback: Using a long TSO command from batch is easy – ColinPaice

The team at MQGem would love to hear what you think. Leave your comments here.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.