IBM MTM 2019: Part Two – Challenge #11

In challenge 11 of IBM’s Master The Mainframe we’re going to learn a thing or two about VSAM. VSAM is one of several access methods in z/OS. But, more about this on the official challenge page.

VSAM Data Sets

IBM Master the Mainframe 2019 Part Two – Challenge #11

Define a VSAM ESDS and copy member of MVS Partitioned Data Set to new VSAM ESDS

Here we go again! We need to copy a data member to a new member inside our JCL data set.

  • dslist jcl as primary command from the ISPF primary option menu.
  • e line command next to the JCL DDNAME.
  • s idcams as primary command to create a new empty member.
  • copy ‘zos.public.jcl(idcams)’ as primary command when in edit mode of idcams.

Here we go. We need to submit this using sub ; =sd ; st but the nice thing is that we already know there’s going to be an error. Choose a as jobname character. We need to view the output of the SYSPRINT with StepName COPY.

Hmm, @@ NOT FOUND IN SYSTEM. We need to replace @@ with the appropriate OUTFILE value. Let’s navigate back to our member and correct the issue.

The outfile was declared as O1. That’s an O, O from Oscar. Not a zero. This should fix it. There are no other @@’s in this file anymore. Let’s sub ; =sd ; st. I chose job character e. Spoiler alert! This fix is not enough, keep on reading instead of executing!

It’s still doesn’t work? Well, it took me a whole 10 minutes to find why! My debugging skills are slacking. The input file is PDS.DATA(PACKED). But do you remember what we did with PACKED in challenge 8? We need it again. Go to PDS.DATA and make a new member called PACKED using the s PACKED primary command. Then copy ‘’.

Let’s change that! And check the output.

12 records were processed! Awesome! Let’s check if it copied to our P2.OUTPUT(#11).

It did! We completed challenge 11!

14 thoughts on “IBM MTM 2019: Part Two – Challenge #11

  1. Hello Kevin, im facing the problem that after submitting to “=sd ; st” for idcams. when i check the submitted Job, SYSPRINT Stepname always pops up DELETE and not COPY. Why and how do I correct it?

  2. Hi man, can you help me out?
    After I did s PACKEd, I copied copy ‘’
    But then I don’t follow anymore, what do you do next?

  3. Hi Kevin,
    Great deduction!
    I knew it was a file who was not there, but I never imagine to take the packed from challenge 8 !!!!
    Absolutely brilliant !!!!
    Thank you!

  4. Hey,

    I think you did an mistake:

    .PDS.DATA(PACKED) is correct. Maybe you have not saved the PDS.DATA(PACKED) from Challenge 8. The task says:

    “”Success is member #11 written into your p2.output partitioned data set where the IDCAMS system utility program execution of command LISTC produces output with a line reading REC-TOTAL————-12. “”

    Like the way you did, you have only 4 records. But you need 12.
    I did the same mistake and had to review it for 20 minutes.

      1. I have the same problem. I changed the @@ in OUTFILE to I1 taking INFILE as pattern just as it said in the instructions and the program executes and gives me no error message but when I go to PDS.OUTPUT(#11) it shows as REC-TOTAL————-0 instead of 12. I checked my PDS.DATA(PACKED) and it is all where it should be and saved.

        The challenge also shows a “complete” status but when I try challenge 11 the VSAM.ESDS does not contain anything. Any tipps on how to solve this?

Leave a Reply

Your email address will not be published. Name, email and website not required.