I just noticed that I’ve released the blog about challenge #04 at 12pm instead of 10am. Honest mistake! I have to admit, I kind of rushed that blog. Sorry about the lack of quality lately. I’ve been very busy IRL.
I’ve picked up some games again after a year long break of serious gaming. Besides that I run a Dungeons and Dragons the Curse of Strahd party as DM every two weeks. So now you know what I do besides programming 8 hours at my job, writing blogs, Master the Mainframe and going out with friends. I have to admit, I really enjoy the 15 minutes of true free time I have per day.
I’m sure you’ve noticed the featured image 🙂 I got it! The badge! IBM contacted me and informed that I’m able to accept my IBM Master the Mainframe badge at Acclaim! I’m so happy! I’m not sure if it means much for any employer but it sure is something I’ll brag with at my local nerd cafe!
Not the best picture, but hey!
Application Development Support
IBM Master the Mainframe Part Three – Challenge #05
A developer at mycompany contacted me and said something is wrong with the BBRI client data. The developer wrote a program to read the BBRI client data. The result was a program execution abnormal end S0C7. Abend S0C7 is a well known failure related to invalid data in a numeric field.
I will recreate the problem, use SORT to remove the invalid packed decimal fields and write the output to a temporary data set. This looks like an easy assignment.
To recreate the problem I’ll create a new member called cbl0002 inside Z30163.source and copy ‘zos.mtm2018.public.source(cbl0002)’ into cbl0002. Then All that’s left is to edit Z30163.JCL(cbl0002) and run it.
Now let’s head to Z30163.JCL(CBL0002J)!
07.35.52 JOB06624 $HASP165 CBL0002J ENDED AT SVSCJES2 - ABENDED S0C7 U0000 CN(INTERNAL) The system detected a data exception (System Completion Code=0C7). From compile unit CBL0002 at entry point CBL0002 at compile unit offset +000003DC at entry offset +000003DC at address 1AC003DC.
Not good! I’ll need to use SORT to remove the invalid packed decimal fields and write the output to a temporary data set. Then pass that sorted data to the application developed by my fellow colleague.
Let’s edit Z30163.JCL(cbl0002j) and first of all delete lines 2 up to and including 8. This way we won’t recompile the program again. Deletion happens via the DD line command. Then we need to copy sort004 into cbl0002 after ‘a’. A is a label, if you don’t know how then you’ll need to read more about labels here to know how to define a label.
After copying the file I need to do the following:
- Delete line beginning with //SORT004 JOB
- Delete line beginning with //BAD
- Delete line beginning with OUTFILE FNAMES=BAD
- Change //GOOD DD SYSOUT=*
to //GOOD DD DSN=&&TMP,DISP=(NEW,PASS,DELETE),SPACE=(CYL,1)
- Change //PRTLINE DD SYSOUT=*,OUTLIM=15000
to //PRTLINE DD DSN=&SYSUID..P3.OUTPUT(#05),DISP=SHR
- Change //BBRI DD DSN=&MASTER,DISP=SNR
to //BBRI DD DSN=&&TMP,DISP=(MOD,DELETE,DELETE)
This is what I’ve got.
I’ve left out some lines on the screenshot above, I don’t want to post the exact solution. I promised Mr. Paul Newton from IBM!
JOB CBL0002J(JOB06654) SUBMITTED 07.56.15 JOB06654 $HASP165 CBL0002J ENDED AT SVSCJES2 - JCL ERROR CN(INTERNAL)
Oops I guess I did something wrong! Let me check!
17 IEFC019I MISPLACED ELSE STATEMENT 18 IEFC019I MISPLACED ENDIF STATEMENT
Hmm… Oh! I didn’t read step 3, it said ‘delete the last 3 lines’. Oopsie! JOB CBL0002J(JOB06657) SUBMITTED!
That’s the output! The challenge is complete! Ofcourse, if I was at my real job I wouldn’t just post a screenshot of acountbalances and account identifiers 😇
Wait this wasn’t about ICETOOL at all?
In my last challenge I said that the next challenge would be about ICETOOL and not COBOL… What? I’m not sure where I got that from. Next challenge is about VSAM KSDS, I double checked this time!
This challenge was REALLY easy and I believe I understood everything I did. The first thing I’ll do after this blog is read the COBOL source code from last two blogs and try to understand what’s going on.
We’ve completed one-third of #MTM part 3! I just checked some other challenges and it seems that challenge #06 will be the last small/short challenge from this series. L
Also, I have to thank all my e-mail subscribers for not unsubscribing as soon as the feature was available! Thanks for your loyalty! I’m also surprised about the amount of traffic the site gets whenever I publish a new blogpost! This is great!
What’s been great for you lately? Let me know! If not in the comments below, you can always mail at firstname.lastname@example.org!