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!
19 thoughts on “IBM MTM 2019: Part Two – Challenge #11”
I got stuck.
Can anybody give a hand. I redid (PACKED), but it didn’t work anyway. I’ve getting this issue:
IDCAMS SYSTEM SERVICES TIME:
IDC3012I ENTRY Z57619.VSAM.ESDS NOT FOUND
IDC3009I ** VSAM CATALOG RETURN CODE IS 8 – REASON CODE IS IGG0CLEG-42
IDC0551I ** ENTRY Z57619.VSAM.ESDS NOT DELETED
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8
DEFINE CLUSTER ( NAME (Z57619.VSAM.ESDS ) –
VOLUME(VPWRKB) TRACKS(15) RECORDSIZE(80,80) –
NONINDEXED REUSE SHAREOPTIONS(2) SPANNED SPEED –
IDC3020I UNABLE TO ALLOCATE SPACE ON USER VOLUME
IDC3009I ** VSAM CATALOG RETURN CODE IS 68 – REASON CODE IS IGG0CLEW-20
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
Hi Valter Andrade Lima de Filho
I see you have the following issue: UNABLE TO ALLOCATE SPACE ON USER VOLUME can you take a look at: https://kevindurant.be/master-the-mainframe-cookbook/#unableToAllocateSpace
I cant seem to get challenge 11 even though I fixed the errors. This is what I am getting.
IDCAMS SYSTEM SERVICES
REPRO INFILE(I1) OUTFILE(O1)
IDC 3300I ERROR OPENING(O1)
IDC3321I ** OPEN/CLOSE/EOV ABEND EXIT TAKEN
IDC0005I NUMBER OF RECORDS PROCESSED was 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE was 12
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?
I took all the steps and I am having the same issue, please let me know if you happened to find a solution
I got the same output as you in the SYSPRINT COPY but i am getting incomplete in p2.output(#11)
After i changed the @@ to 01 the job does not have SYSPRINT at all it only has J..
Hi man, can you help me out?
After I did s PACKEd, I copied copy ‘zos.mtm2019.public.shared.data(packed)’
But then I don’t follow anymore, what do you do next?
Okay, some magic made it go to complete :p
(delete and redo the PACKED part)
how do you know that the outfile is O1?
I knew it was a file who was not there, but I never imagine to take the packed from challenge 8 !!!!
Absolutely brilliant !!!!
For me the output showed REC-TOTAL———12 but dslist p2.output is showing incomplete for #11……..Any help here
mine shows the samething :/
If you made sure you change the Outline (O1) “Oscar”
And REPR@ to REPRO.
Then you should run a tso scorep2 to update the server.
Sometimes that command changes from incomplete/incorrect to correct.
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.
Good point, I’ll look into it soon! It’s strange though, TSO SCOREP2 say this challenge is correct. I have fixed the error 🙂 Thanks!
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?
Yeah nevermind. Changed OUTFILE to o1 and that worked now. Just a rookie mistake.
I need to do validate maxcc code of job name using automation.how should I do it.