Some Advanced Features That Might Come in Handy: JCL: Kicking Things Off
Some Advanced Features That Might Come in Handy: JCL: Kicking Things Off
1. RUN THE JES1JOB1 JCL 2. CHECK OUT JOBS 3. FIND THE JES1JOB1 JOB
Verify that the job ran correctly by looking in the ”Jobs” bar, Open up the profile and look for JES1JOB1. Remember that you
Find the JES1JOB1 file in MTM2020.PUBLIC.JCL and copy it
which should be at the bottom on the left side unless you may need to hit the Refresh icon to see the latest updates in
into your own JCL data set (ZXXXXX.JCL), giving it the same
moved it. There should be a profile already defined in there, here, so give it a few seconds and look for something like the
name. Right-click on the copy in your JCL data set and select
which you did in Step 12 of the first VS Code Challenge, “Let’s screenshot above.
“Submit Job”. The job should have run with no problems.
Get Connected”.
If you still don’t see any output, right-click on the profile name,
Protip: Did you see that box pop up in the bottom right corner and set Job Prefix to blank, and Job Owner to your ID (ZXXXXX).
of VS Code? You can also just click on that, and it’ll take you You may have a filter set that’s not showing any of your output.
directly to the job output. Kinda nice!
4. FIND THE SECRET WORD 5. COPY OVER JES1JOB2 6. READ THE COMMENTS
Click on the arrow to open up the output for JES1JOB1. You Look at lines 2-4. They start with //* and may show up as
Copy JES1JOB2 over from the MTM2020.PUBLIC.JCL data green, meaning they are comments. Those comments are there
will probably find five different pieces of output in there.
set, putting a copy in your own JCL data set with the same for you, not the system, so read them and figure out what you
name. Open it up and look at the JCL in here. have to do.
Somewhere in there (as well as in the JCL you submitted)
there is an output data set where a secret word got stored.
It's easy to think that comments are not as important as code,
Open up that data set and look for the secret word inside. It’s but often, they reveal the true intention of the original author,
a bit of a scavenger hunt, but when you find it, it’ll be obvious. which can be very helpful when trying to make changes, or fix
problems. They can be used to spell out how the program is
meant to be used, what its limitations are, or who to contact in
case there is a problem.
“WHAT ARE THE DIFFERENT OUTPUTS FOR?”
For this particular problem, they're letting you know that in
DD statements are the stars of JCL statements. Understand them, and your life will become order for this program, you need to find a secret word and put
easier. Master them and you will become a JCL Genius. it on Line 5 of the JCL.
Part by part, DD sets it up by saying “This is a Data Definition”, and then spells out where that data
goes in the DSN section. There are other places data can go, including temporary files and output
spools, but in our example, these are data set members (you can tell because they’re in
(parenthesis). Lastly is the DISP statement, which determines whether it expects that input or
output to exist when it starts, how to handle it, and what to do with it once it’s done using it. Want to talk? Join our Slack Tweet about it!
ibm.biz/mtm_slack #MasterTheMainframe
JCL1 Introduction to JCL and JES
(By the way, the secret word is *NOT* mainframe, that’s just If there are errors, then perhaps you didn’t enter the right To validate and mark as complete, open up
an example) secret word, didn’t save the file after making updates, or MTM2020.PUBLIC.JCL and look for CHK. Right-click on it, and
didn’t run the correct version. When there are multiple then select "Submit Job" to validate it.
versions, the lower ones are usually the most recent.