Mainframe PROBLEM TWO
20 POINTS
INTERMEDIATE MAINFRAME EXERCISES
NOTE: YOU HAVE TO THINK AND REFER BACK TO
PROBLEM ONE TO SOLVE THIS PROBLEM
[just like the real IBM master the mainframe contest]
Hints for 2 of your challenges [#8, #9] READ THESE HINTS NOW!!
#8. JCL and SDSF
a. There are NO ERRORS in this JCL – just change it to your ID.
b. You must put XDC beside the jobname REXXG0## in the JES output queue.
c. At the menu, be very careful entering the dataset name and the member name
———————————–
#9. Fix JCL errors
a. You can only use a comma for continuing a command [JOB or EXEC or DD] to the next line. In other words, a comma at the end of a line says you are continuing a command to the next line. So do not put a comma unless it is required.
b. Another hint for this part is check the spelling of all members and all PDS’s
________________________________
You should have NO ISSUES with the FIRST 7
—————————————————————–
#8 & #9 are not hard if you read carefully and take your time!!
#1 CREATE A NEW DATASET MEMBER
For this problem we have created a data set called
‘UNTG###.UNTG###.COMPETE.PARTTWO’ .
Your user ID is purposefully used twice in this data set name; this aids IBM in the judging of your work when you are finished with this part of the contest. This data set is very important — it will eventually contain all of your work to be handed in. From here on out, we will refer to this data set as COMPETE.PARTTWO.
Your challenge: Go to the DSLIST panel (ISPF option 3.4) and [if it is not already there] enter your user ID in the Dsname Level field, then press enter
On the next panel, enter E to the left of COMPETE.PARTTWO. press Enter
On the command line, type S NEWMEMBR. [NOT spelled newmember] then enter
In the editor session that automatically opens, Type “UNTG### WAS HERE IN BCIS 3620,” on the first line of the blank screen. Then enter.
If you are having Deva VU, you did something similar to this in the EDITING part of PROBLEM ONE.
F3 back out, and you’ll see that NEWMEMBR has been created in COMPETE.PARTTWO.
You have just completed the first challenge. NEWMEMBR
#2 COBOL challenge
Background: Here are some interesting details about COBOL:
· There are over 220 billion lines of COBOL in existence, a figure which equates to around 80% of the world’s actively used code
· 75% of the world’s business data is processed in COBOL
· 90% of global financial transactions are processed in COBOL
· There are 1.5 – 2 million developers, globally, working with COBOL code
· Around 5 billion lines of new COBOL code are added to live systems every year
· It’s important for you to have some exposure to the language that is running so much of the world’s business. We’ll dive deeper into COBOL later, but for now, let’s just get your feet wet.
· Your challenge: Use JCL to compile, link and execute COBOL programs.
· To compile, link and execute your first COBOL program on this system,
· follow these steps:
· Have a look inside your UNTG###.JCL data set. The CBL1JCL job contains the JCL to compile, link and execute a simple COBOL program. Change the JCL JOB statement, substituting #### with the last four digits of your user ID.
· Type HILITE AUTO on the command line, The HILITE command allows the ISPF editor to color-code data based on context when you are Editing or Viewing a member.
Submit the job. When it completes successfully, have a look inside
COMPETE.PARTTWO(CBL1), which is the output that the JCL job you just ran
wrote. It should contain a message that reads “hello world.”
Edit UNG###.SOURCE(CBL1) to change the output from “hello world.” to
“COBOL is easy!” Compile, link and execute the program again.
· Verify that your COMPETE.PARTTWO(CBL1) output now says “COBOL is easy!”
· You have just completed the second challenge. CBL1
———————————————————————————
#3 another COBOL challenge
1. Take a look at UNTG###.SOURCE(CBL2). This program will read from PGMI1 and write to PGMO1.
2. Edit UNTG###.JCL(CBL2JCL). Observe that:
· //PGMI1 is the JCL DDNAME used by program to read data.
· //PGMO1 is the JCL DDNAME used by program to write data.
3. Change the JCL JOB statement, substituting ### with the last 3 digits of your user ID and submit the job.
4. Go to SDSF to look at your CBL2JCL listing to see that the job ran. Next =3.4 to the member that was specified by the PGMO1 DDNAME to see what it contains. HINT: You have to look at the CBL2JCL to see where the output went.
You see that the output lists the names of the members of the US House of Representatives.
You have just completed the third challenge. CBL2
—————————————————————————-
#4 yet another COBOL challenge
1. Edit ‘UNTG###.JCL(CBLXJCL). Observe that:
· //PGMI1 is the JCL DDNAME used by program to read data.
· //PGMO1 is the JCL DDNAME used by program to write data.
2. Change the JCL JOB statement, substituting ### with the number of your personal user ID. Observe that JCL DDNAME PGMO1 will write records to COMPETE.PARTTWO(CBL3).
3. Have a look at the following JCL statement:
//* DD DSN=&SYSUID..DATA(SENATE),DISP=SHR
Remove, the * after the // [leaving only // DD DSN……etc.. ]
Now, PGMI1 will concatenate UNTG###.DATA(HOUSE) and
UNTG###.DATA(SENATE) and read data from them as though they
were a single continuous stream of records.
4. Submit the job and verify its completion.
Now when you look in COMPETE.PARTTWO(CBL3), you’ll see the entire
US Congress, including the Senate and the House. If you don’t see 542
records present, you’ll need to debug to see where you went wrong.
You have just completed the fourth challenge. CBL3
#5 Batch JAVA
Objective: Compile and execute a JAVA program in MVS batch mode using JCL.
FIRST:
Go to ISPF edit and navigate to UNTG0##.JCL(JAVABTCH) and take a look at the JCL.
Change the jobname to JAVA####, where #### is the last four digits of your ID.
Also, change all other instances of untg### to match your user ID, making sure your User Id is typed in lowercase if shown in lowercase and uppercase if shown in uppercase.
As before in JCL, type “sub” on the command line to submit it.
Look at your output in the:
UNTG0## .UNTG0##.COMPETE.PARTTWO(SQUREOUT) member
to see if it ran successfully, if not fix your typos and rerun it.
SECOND:
Go to ISPF edit and navigate to UNTG0##.SOURCE(SQUREPGM) and take a look at the java source code.
Type your name where you are asked to do so, and change the numsquares field from 5 to 15.
Navigate back to UNTG0##.JCL(JAVABTCH) and type “sub” on the command line to submit it again. Again, look at your output in the:
UNTG0## .UNTG0##.COMPETE.PARTTWO(SQUREOUT) member to see
the result of the changes you made. If it did not run, fix your typos and rerun it.
You have just completed the FIFTH challenge SQUREOUT
#6 RUNNING A C++ JOB ON THE Z
Objective: Compile and execute a C++ program in MVS batch mode using JCL.
FIRST:
Go to your UNTG0##.DATAIN folder and look at the PAYIN file. It has 2 lines:
The first line, 40.0, will be read into the C++ program as regular hours.
The second line, 15.0, will be read into the C++ program as overtime hours.
NEXT: navigate to UNTG0##.JCL(CPPBTCH) and take a look at the JCL.
Change the jobname to CPP####, where #### is the last four digits of your ID.
Also, change all other instances of untg### to match your user ID, making sure your userid is typed in uppercase if shown in uppercase.
As before in JCL, type “SUB” on the command line to submit it.
Look at your output in the:
UNTG0## .UNTG0##.COMPETE.PARTTWO(PAYOUT) member
to see if it ran successfully[$625] , if not fix your typos and rerun it.
SECOND:
Go to ISPF edit and navigate to UNTG0##.SOURCE(PAYROLL) and take a look at the C++ source code. Change the basePayRate from 10.00 to 20.00.
Navigate back to UNTG0##.JCL(CPPBTCH) and type “sub” on the command line to submit it again. Again, look at your output in the:
UNTG0## .UNTG0##.COMPETE.PARTTWO(PAYOUT) member
to see the result of the changes you made [$1250]
If it did not run, fix your typos and rerun it.
You have just completed the SIXTH challenge PAYOUT
#7 Using C
Objective: Modify a C program and use JCL to compile and run it.
HelloWorld in C
Take a look at UNTG0##.SOURCE(
HELLOSRC
). This is the C code that you’ll be working with. Take some time to look at the details of the code. A little like Java, isn’t it? C runs on a new set of rules, but syntactically it is very similar to Java. Hopefully the resemblance will aid you in editing this program.
Now, take a look at UNTG0##.JCL(
HELLOCMP
). This is the JCL that compiles the code in HELLOSRC. Change the jobname to HCMP####, where #### is the last four digits of your ID.
Submit HELLOCMP to compile the source code. If your program compiled successfully, you will find an executable module in UNTG0##.LOAD called HELLOINC which is not readable. In SDSF, JESMSGLG will show RC 0 for both the COMPILE step and the BIND step if everything was successful.
Once your code is compiled, look at UNTG0##.JCL(
HELLORUN
). This is the JCL that runs the program you’ve just compiled. Change the jobname to HRUN####, where #### is the last four digits of your ID.
Submit HELLORUN to run the HELLOINC program. Navigate to JSMSGLG inside SDSF and confirm that the EXECUTE step returned RC 00. If your program ran successfully, you will have a new dataset called HELLOPRT in COMPETE.PARTTWO that says HELLO WORLD Again.
Now that you know the program compiles and runs correctly, it is time to modify the C program to get your own results.
To complete this challenge: open HELLOSRC in the SOURCE folder then:
1. Modify the line “HELLO WORLD Again ” to “HELLO Your Name”
[ type your last name]
2. Submit HELLOCMP to re-compile your program.
3. Check in SDSF that the program successfully compiled. If it did, submit HELLORUN to run the program.
4. Navigate to COMPETE.PARTTWO(HELLOPRT) to check that your dataset contains the corrected output.
!
You have just completed the SEVENTH challenge HELLOPRT
#8 JCL and SDSF
[There are NO ERRORS in this JCL, but you must use XDC correctly]
Background: In PROBLEM ONE / STEP ONE, you ran a simple REXX program from the ISPF Command Shell (=6). Now we are going to run that same REXX program in batch.
In z/OS, you have two different ways to do work: interactively in the foreground or non-interactively in the background. All of your earlier was considered foreground work. You can do a lot of stuff in the foreground, but when a program takes a lot of time to process, you can’t do anything else with your interactive session while it’s running.
If you submit long-running programs to process in the background, then you can continue to use the interactive foreground while your long-running program processes in the background.
In z/OS, a collection of one or more programs that works together, perhaps passing data from one to the next, that runs in batch in the background is usually referred to in mainframe-speak as a “job”.
In order to cause work to run in batch (that is, to submit a job), you need to instruct z/OS through JCL (Job Control Language). You submit your JCL to JES (Job Entry Subsystem) and the system allocates the necessary resources for your job, then executes the work when the resources are available.
IBM customers have requested that students learn more about JCL, so you’ll be seeing more of it.
JCL is a very rich language, and it’s very different from any other programming languages. JCL has been around for over 40 years; as you might imagine, JCL for just about every conceivable task has already been written.
Most systems and applications programmers will find a JCL file that does something very close to what they want to do, and then make a few little changes to it so that it fits their needs. You’re going to do the same thing.
Your challenge: Submit JCL
To execute the REXX exec program that you ran in PROBLEM ONE / STEP ONE, as a batch job.
First, edit member RUNREXX in UNTG###.JCL. This member contains a job that is very close to what you need.
Inside that member, change jobname to REXX####, where ### is the user ID. For example, change jobname to REXXG027 if your ID is UNTG027. Change any other UNTG### to your UNTG number
Note: While z/OS is not case sensitive, you must use UPPERCASE letters in JCL
Change partone_member [IN THE JCL] to the name of the member you created in PROBLEM ONE / STEP ONE, which was up to the first eight letters of your last name. (In the example, the member was named ‘HAL’.)
On the command line, enter SUBMIT.
This will send your JCL, which you can also call your job, to JES for processing. JES manages all jobs submitted to the z/OS system.
JES will put your job on a queue (called an “initiator”), which helps decide when to submit your job for execution, and helps allocate some resources needed for the job.
When your job runs, JES manages output from your job (and all other jobs that are submitted) in a special set of data sets called the “spool”. If you see the message
JOB… $HASP… REXXG## ENDED AT SVSCJES2 MAXCC=0000 CN(INTERNAL)
it means that your job ran with a return code of 0, which is good news.
To check the status of your job, enter the following on the ISPF command line:
tso status REXX#### [be sure to use your ####]
which should tell you that your job is on the output queue. The output produced when your job ran is on the Spool Display and Search Facility, or SDSF.
To get to SDSF on this system, enter SD from the ISPF Primary Option Menu. At the SDSF Primary Option Menu, enter the following command so that you will see only your output:
OWNER UNTG###
Then enter the following SDSF command:
ST [for status],
At the SDSF command prompt type ‘OWNER UNTG###’ which will display the status of all tasks owned by OWNER UNTG###
View your output, along with some system-generated output, by entering a ? to the left your REXX### jobname.
You can next enter an S (select) to the left of any item to see that one part of output of your job. Look closely at the last part. Look Familiar?
F3 will exit one part of output and a second F3 will return to the panel that lists the jobname REXX#### job in the JES output queue.
Enter an S to the left of REXX####.
What you’ll see now are all of the parts at once.
NOTE: Entering ? to the left of the jobname separates the output into logical sections. Entering S to the left of the jobname will display all the logical sections concatenated as a continuous stream of output.
Do not forget to use F7 and F8 to scroll up and down, and F10 and F11 to scroll left and right.
After verifying that the bottom of the job contains the same output that it did earlier, you must write out ALL of the output to a member of your COMPETE.PARTTWO data set. The member is called RUNREXX.
To do this, navigate to the left of jobname REXX####
and enter the command XDC and press enter-
From the next menu:
a. Type the Data set name as: UNTG###.COMPETE.PARTTWO
tab
b. Type the Member name as RUNREXX
tab
c. Type Disposition as OLD
Accept all the other defaults and press enter
F3 out of SDSF and back to the Primary ISDF screen
Look at your files and you will see a new member – RUNREXX – in your COMPETE.PARTTWO data set.
You have just completed the EIGHTH challenge. RUNREXX
FYI NOTE:
If you weren’t successful YOU NEED TO purge your job output –
go to the SDSF Status Display menu (ST) and
enter P to the left of the job you want to purge, press enter
NOTE: This information was at the end of your original install TN3270 hints.
#9 Fixing common JCL errors
Background: As a systems programmer, you will be doing lots of work with JCL. If you make a simple JCL error, such as forgetting a comma or coding a JCL statement that runs past column 71, your job will, in most cases, end very quickly, and the system will inform you of a JCL error.
Your challenge: Fix more JCL errors. You need to check the commas and for a misspelled file [PDS] name
To get started, edit the member BADJCL in UNTG###.JCL As you might gather from the name, this JCL is not good. Well, not until you fix it, that is.
Hint: The HILITE command allows the ISPF editor to color-code data based on context when you are Editing or Viewing a member. The editor is capable of coloring keywords, symbols, comments and operands.
Simply invoke HILITE AUTO at the command line, and the editor will take care of the rest. It recognizes just about every major language out there.
Change jobname to JCL####, of your ID, and change any other UNTG### to yours.
Now submit the job.
Oh, man! A JCL ERROR message will be returned to the screen. Bet you saw that one coming. What gives?
Check your output in SDSF and fix the error. ENTER ST and then a ? to separate the output sections.
You will see that there’s something wrong with a continuation on Statement 3. The message ID starts with IEF.
Correct the JCL error and submit the job again. Oh no! Another JCL error? (If your job takes a moment to run, pressing Enter again will show you that there was an error.)
Go take a look in SDSF. Look for the IEFA107I message. The system seems to be having trouble finding your data set. Why?
Here’s a hint: Look at your job and carefully check the spelling of the PDS [data set] names. Go to ISPF option 3.4 if you need to look at which data set names start with your ID UNTG###.
————————————————————-
After you fix the error and get the job to run correctly with no JCL errors, go back to SDSF. You’ll find a new piece of held output there.
Once you verify that you got this new output:
XDC all of the output from the job into your COMPETE.PARTTWO data set name with the member name FIXEDJCL and the disposition OLD.
[you just did an XDC in part 8 above!!!]
Again, be sure that you XDC from beside the JOBNAME to ensure that your new member will contain JESMSGLG, JESJCL and JESYSMSG, as well as the new piece of output.
You just debugged a JCL job – WELL DONE!!
You have just completed the NINTH challenge. FIXEDJCL
—————————————————————————
FYI Note: DDName, or Data Definition Name, is the eight-character designation after the // of the DD statement. The DD statement is a JCL statement describing a data set associated with a specific job step. In mainframe circles, the terms DD and DDName are often used interchangeably.
If you followed all the steps correctly, you should have 9 members in your UNTG###.UNTG###.COMPETE.PARTTWO data set:
1.
NEWMEMBR
2.
CBL1
3.
CBL2
4.
CBL3
5.
SQUREOUT
6.
PAYOUT
7.
HELLOPRT
8.
RUNREXX
9. FIXEDJCL
When finished email me and let me know that you have finished problem two.
Always include your UNTG0## ID in your emails to me
————————————————————
END OF PROBLEM TWO
Why Work with Us
Top Quality and Well-Researched Papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Free Unlimited Revisions
If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.
Prompt Delivery and 100% Money-Back-Guarantee
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & Confidential
We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.