Download presentation
Presentation is loading. Please wait.
Published byBethanie Hall Modified over 9 years ago
1
Lecture 31 Creating Executable Programs on the Mainframe Tuesday, January 20, 2009
2
Lecture 32 Lecture Overview Program execution components JCL COBOL SDSF Compiling and executing Lab 1c Batch and online modes Checking output Viewing/debugging errors
3
Lecture 33 Example: Compile/Execution Structure Java SourceByte Code JDK (compiler) JRE (executes) Output
4
Lecture 34 Program Execution Components COBOL Source JCL Copy Libraries Load Module Files Other COBOL Programs JCL (executes load module) Creates SDSF Can be in the same JCL
5
Lecture 35
6
6
7
7
8
8
9
9 //MM01P JOB (36512),'A PRINCE',NOTIFY=&SYSUID //STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=MM01.COPYLIB.COBOL(CUSTMAST),DISP=SHR //SYSUT2 DD SYSOUT=* //SYSIN DD DUMMY The JOB statement must be the first statement in a job. It supplies a job name to identify the job, along with accounting information and various options that affect how the job is processed. The “JOB” Statement
10
Lecture 310 //MM01P JOB (36512),'A PRINCE',NOTIFY=&SYSUID //STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=MM01.COPYLIB.COBOL(CUSTMAST),DISP=SHR //SYSUT2 DD SYSOUT=* //SYSIN DD DUMMY The EXEC statement identifies the program or procedure to be executed in the job step. It can have a step name in the name field. The “EXEC” Statement
11
Lecture 311 //MM01P JOB (36512),'A PRINCE',NOTIFY=&SYSUID //STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=MM01.COPYLIB.COBOL(CUSTMAST),DISP=SHR //SYSUT2 DD SYSOUT=* //SYSIN DD DUMMY The DD statement allocates the data sets required by the program or procedure. The ddname in the name field must be the same as the one that’s used in the program or procedure. You typically code the DD statement for a printer file using the SYSOUT = * format. Then, the output is processed based on the default output class or the output class you specify in the MSGCLASS parameter of the JOB statement. You can specify a dummy data set by coding the DUMMY parameter on its DD statement. The “DD” Statement
12
Lecture 312
13
Lecture 313
14
Lecture 314
15
Lecture 315
16
Lecture 316
17
Lecture 317
18
Lecture 318
19
Lecture 319 SDSF - Status
20
Lecture 320 SDSF - Owner
21
Lecture 321 SDSF – Select Job
22
Lecture 322 SDSF – View Output
23
Lecture 323
24
Lecture 324
25
Lecture 325
26
Lecture 326 Lab 1c Compile, link and run a “Hello World” Cobol application. Create/Run the program using JCL. Run the program in Batch and online (TSO) modes Step 1: Create 3 PDSs: Create a data set for the cobol program: xxx.HELLO.COBOL Create a data set for the the JCL to compile/run the program: xxx.HELLO.JCL Create a data set for the resulting executable: xxx.HELLO.LOAD (where ‘XXX’ is your User Id)
27
Lecture 327 Lab 1c - COBOL Step 2: Create the source code “Hello World” Cobol example: xxx.HELLO.COBOL(FIRST) This would be done using ISPF. Note that the line numbers are created/updated automatically
28
Lecture 328 Lab 1c - Cobol Program
29
Lecture 329 Lab 1c - JCL STEP 3: Create the JCL used to compile/link/run the hello world example. It should be in the JCL PDS: XXX.HELLO.JCL(COMPILE)
30
Lecture 330 Lab 1c - JCL
31
Lecture 331 Lab 1c – Execute (Batch) STEP 4: Execute the JCL – from within ISPF (when editing the JCL), enter the command ‘submit’ on the command line (aka the line that has “Command ===>” ) STEP 5: View the results from executing the JCL. From the top level in ISPF: Execute command 13 (SDSF). Select O (to view output from the batch job). You can Filter based on owner (your account id), You should be able to see the output “MYHELLO” – that was the name of the JOB (you can see this in the JCL). To view the output, one would enter an “?” in the left column prior to the name of the output. This will show the different “tasks in the JCL. Then to see the actual output, enter a “s” next to the output you want to view (Hint: Look at the “GO” output)
32
Lecture 332 Lab 1c – Execute (TSO) STEP 6: Execute using TSO (Using ISPF “command” - 6) ALLOCATE DDNAME(SYSOUT) DSNAME(*) ALLOCATE DDNAME(SYSIN) DSNAME(*) CALL ’xxx.HELLO.LOAD(FIRST)'
33
Lecture 333
34
Lecture 334
35
Lecture 335
36
Lecture 336
37
Lecture 337
38
Lecture 338
39
Lecture 339
40
Lecture 340
41
Lecture 341
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.