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 ‘zos.mtm2019.public.shared.data(packed)’.
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!