z/OS JCL Assignment Pack Please note that Chapter-based exercises are copyright by Mike Murach & Associates, Inc., 2002. Chapter 3 How to use ISPF to manage your JCL ............................................................... 3 METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language Assignment 1—PUNCH AND RUN ..................................................... 4 Chapter 4 The basics of Job Control Language .................................................................. 5 METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 2 .................................................................................. 7 Chapter 5 How to use JCL and JES facilities to manage program execution.................... 9 Chapter 6 How to use JCL facilities to allocate other types of DASD data sets ............. 10 Chapter 7 How to manage tape data sets .......................................................................... 11 Chapter 8 How to manage SYSOUT data sets ................................................................. 12 Chapter 9 How to use JCL procedures ............................................................................. 13 METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 3 ................................................................................ 14 METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 3 (REVISED) ............................................................ 15 Chapter 10 How to process jobs conditionally ................................................................. 16 Chapter 11 How to use RESTART and other program execution facilities ..................... 17 Chapter 12 How to manage generation data groups ......................................................... 18 Chapter 13 How to use the SMS facilities for data set allocation ................................... 19 Chapter 15 How to use JCL for VSAM data sets ............................................................. 20 Chapter 16 How to use Access Method Services (AMS) ................................................. 21 METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 5 ............................................................................... 22 Chapter 17 How to use JCL procedures to compile and test programs ........................... 23 Chapter 18 How to use the OS/390 utility programs ........................................................ 24 Chapter 19 How to use the sort/merge utility ................................................................... 25 METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 4 ................................................................................ 26 Chapter 20 How to use TSO, CLIST, and REXX ............................................................ 27 Chapter 21 How to use UNIX System Services ............................................................... 28 D:\219468807.doc 1 of 28 07/11/2016 2:13 PM D:\219468807.doc 2 of 28 07/11/2016 2:13 PM Chapter 3 How to use ISPF to manage your JCL Exercises 1. Find out the procedures used at your installation to log on to and access ISPF, including your TSO user-id and password. 2. Use the ISPF editor to create a library member that contains the following JCL statements to run an IBM utility program named IEBGENER (find out from your supervisor or instructor the details for coding the JOB card and the library and member name to use): //jobname JOB 36512,'your name here' // EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD * This is a sample test file. This is a sample test file. This is a sample test file. This is a sample test file. This is a sample test file. /* //SYSUT2 DD SYSOUT=* //SYSIN DD DUMMY 3. Submit the job created in exercise 2 for processing. It creates a SYSOUT file (SYSUT2) that contains the line “This is a sample test file.” 5 times. It also creates a second SYSOUT file (SYSPRINT) that contains output messages generated by the program. 4. Use SDSF to view the results of your job (use the Outlist utility if SDSF is not available). If the job did not execute because of a JCL error, use the ISPF editor to correct the mistake and resubmit the job. D:\219468807.doc 3 of 28 07/11/2016 2:13 PM METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language Assignment 1—PUNCH AND RUN OBJECTIVE:To familiarize the student with the process submitting jobs to the IBM system. of Code the following JCL to create and print an in-stream data set using the IEBGENER utility program. Code the standards. JOB statement following your installation's Code the following JCL statements: //STEP1 EXEC //SYSPRINT DD //SYSUT1 DD PGM=IEBGENER SYSOUT=* * (Type in a paragraph containing: your name work experience what you hope to learn from this class) //SYSUT2 //SYSIN D:\219468807.doc DD DD SYSOUT=* DUMMY 4 of 28 07/11/2016 2:13 PM Chapter 4 The basics of Job Control Language Exercises 1. Code a JOB statement for a job named EXJOB1. Include the following additional information in the JOB statement: a. accounting information: 36512 b. programmer name c. the job should notify your user-id when it completes d. a message class of A e. a message level specification that prints JCL statements as well as all messages 2. Code an EXEC statement to run a program named CHK1150 in a job step named CHKPR1. 3. Add a PARM parameter to the EXEC statement from exercise 2 that passes “CK=5” to program CHK1150. 4. Code a DD statement that allocates an existing, cataloged data set named PRD.PAY.MASTER. The ddname for the statement is PAYMAST. 5. Using the following system flowchart and data set requirements, code the JCL necessary to execute the specified job. Allocate 20 cylinders of primary space and 10 cylinders of secondary space on volume TSO001 to each output file. Delete the spec, detail, and summary files once they’ve been used to produce the reports. D:\219468807.doc 5 of 28 07/11/2016 2:13 PM System flowchart Field plot data file Select project detail records (FPR0100) Spec file Detail file Summary file Produce design report (FPR0200) Produce detail report (FPR0300) Produce summary report (FPR0400) Design report Detail report Summary report Data set requirements Step name Program ddname Data set name FPR0100 FPR0100 FPR0200 FPR0200 FPR0300 FPR0300 FPR0400 FPR0400 FLDPLOT SPECFILE DETAIL SUMMARY SPECFILE DSGNRPT DETAIL DETLRPT SUMMARY SUMMRPT MM01.FPR.PLOT MM01.FPR.SPECFILE MM01.FPR.DETAIL MM01.FPR.SUMMARY MM01.FPR.SPECFILE SYSOUT MM01.FPR.DETAIL SYSOUT MM01.FPR.SUMMARY SYSOUT D:\219468807.doc 6 of 28 07/11/2016 2:13 PM METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 2 OBJECTIVE: To familiarize the student with creating a library, storing a member in the library and printing a member of the library. Note: The IEBUPDTE utility program is not covered in the current OS/390 and z/OS JCL textbook. It was used to maintain libraries (partitioned data sets or PDSs) via batch jobs. This function is now mostly performed via ISPF. The IEBGENER program is covered in detail in Chapter 18. Code a two step job, the first step will add a member to a temporary partitioned data set (a library). The next step will print that member. 1. In the first step: a. Execute the program IEBUPDTE b. Pass the program a PARM parameter of NEW c. Allocate a SYSPRINT file d.Allocate a SYSUT2 file to create a temporary PDS. Use three tracks of primary storage and two directory blocks. Do not catalogue the data set but pass it to the next step. Use SYSDA as the unit device. Record length is 80. e. Allocate a SYSIN instream file using the following cards ./ADD NAME=JCLxxx,LIST=ALL (Here type in the records on p. 64 in the textbook. Use the following format: 1-11 Social Security Number 12-20 First Name 21 Initial 22-30 Last Name 31-35 Employee Number Type in one additional record containing your name and numbers.) ./ ENDUP D:\219468807.doc 7 of 28 07/11/2016 2:13 PM 2. In the second step: a. b. c. d. e. Execute the program IEBGENER Allocate a SYSPRINT file Allocate a SYSUT2 printer file Allocate a SYSIN file and DUMMY it out Allocate a SYSUT1 file that refers to the temporary PDS created in step 1. Include the member name as part of the data set name. *** In the references to JCLxxx replace the xxx with your initials. D:\219468807.doc 8 of 28 07/11/2016 2:13 PM Chapter 5 How to use JCL and JES facilities to manage program execution Excercises 1. Code a JOB statement that specifies job execution class Q and scheduling priority 8, such that the job will be held in the job queue until the operator releases it for execution. 2. Code an EXEC statement that executes a program named KZB0100 and limits the region to 6MB. 3. Code a JOB statement that limits the job’s total execution time to 4 hours and the number of pages of SYSOUT data to 5000. Refer to the JCL statements below to answer the three questions that follow. 1--> //jobname 2--> //STEP1 3--> //SYSOUT 4--> //STEP2 5--> //SYSOUT 6--> JOB 36512,'X XXXXXXX',NOTIFY=userid EXEC PGM=EGAX401 DD SYSOUT=A EXEC PGM=EGAX402 DD SYSOUT=A 4. Code a DD statement that allocates PROD.LOADLIB as a job library, then indicate the position in the job stream above where you would insert the DD statement. 5. Code a DD statement that allocates TEST.LOADLIB as a step library for program EGAX401, then indicate the position in the job stream above where you would insert the DD statement. 6. Code a DD statement that allocates a formatted system dump of the user region of the job’s private address space if STEP2 abends, then indicate the position in the job stream above where you would insert the DD statement. D:\219468807.doc 9 of 28 07/11/2016 2:13 PM Chapter 6 How to use JCL facilities to allocate other types of DASD data sets Exercises 1. Code two DD statements to process a temporary data set. The first DD statement should use the ddname X401EXTR and should allocate 20 cylinders of primary space and 10 cylinders of secondary space on a SYSDA unit named TSO001. The second DD statement, which would appear in a subsequent job step, should use the same ddname. It should allocate the passed temporary data set and delete it when the step completes. 2. Code a DD statement for a dummy data set using the ddname X401PARM. 3. Code the DD statements required to concatenate three partitioned data sets named MM01.COBLIB.PRIVATE, TEST.COBLIB, and SYS1.COBLIB using the ddname SYSLIB. 4. Code a DD statement that allocates three SYSDA-class DASD volumes named TSO001, TSO002, and TSO003 for a new data set named EGAX.SAMPLE. Provide for up to 250 cylinders of primary space and 100 cylinders for secondary allocations. 5. Examine the following SPACE parameters: SPACE=(CYL,(20,5),,CONTIG) SPACE=(CYL,(20,5),RLSE) SPACE=(CYL,(20,5),,ALX) SPACE=(CYL,(20,5),,MXIG) a. Which of the parameters above releases any unused space so other data sets can use it? b. Which requests a contiguous space allocation? c. Which allocates the largest extent available on a volume? d. Which allocates the five largest extents available on a volume? 6. Code a DCB parameter to refer back to a previous DD statement defined in a previous job step named UP1. The previous ddname is UPFILE. 7. Code an IEFBR14 job step that deletes a cataloged data set named X401.TEMP.SAMPLE. D:\219468807.doc 10 of 28 07/11/2016 2:13 PM Chapter 7 How to manage tape data sets Exercises 1. Code a DD statement that creates a tape data set named X401.JOURNAL on a single nonspecific private tape volume. Specify a block size of 16,384. 2. Code a DD statement to allocate the first data set on a labelled tape whose volume serial number is 555123. The data set is sequential with fixed-length 80-byte records blocked in 16,000-byte blocks. D:\219468807.doc 11 of 28 07/11/2016 2:13 PM Chapter 8 How to manage SYSOUT data sets Exercises 1. Modify the following job stream so that all of its SYSOUT data sets except PRDETL use a default OUTPUT statement that prints 2 copies of each data set using SYSOUT class B. The PRDETL data set should reference an OUTPUT statement named OUT1 that prints 4 copies using SYSOUT class B. //MM01E8A //STEP1 //SYSOUT //PRLIST //PRSUM //PRDETL JOB EXEC DD DD DD DD 36512,'X XXXXXXX',NOTIFY=userid PGM=PR3310 SYSOUT=A SYSOUT=A SYSOUT=A SYSOUT=A 2. Code a DD statement to create a SYSOUT data set that uses SYSOUT class D, that is limited to 2000 lines, and that is held in the output queue until released by the operator. Use the ddname HOLDOUT. 3. Code a DD statement to create a SYSOUT data set that uses SYSOUT class C, that starts printing after the first 700 pages are produced, and that is routed to remote printer H220. Use the ddname INSTRPT. 4. Modify the job stream shown in exercise 1 so that it uses JES2 or JES3 control statements to print 2 copies of the PRLIST and PRSUM data sets and 4 copies of the PRDETL data set. D:\219468807.doc 12 of 28 07/11/2016 2:13 PM Chapter 9 How to use JCL procedures Exercises 1. Assume the following procedure is cataloged under the name DUMP: //STEP1 //SYSPRINT //SYSUT1 //SYSUT2 //SYSIN EXEC DD DD DD DD PGM=IEBGENER SYSOUT=* DUMMY DUMMY DUMMY Code a job stream that invokes the procedure, overriding the SYSUT1 DD statement so that it refers to a cataloged data set named MM01.ENGR.SAMPLE. 2. Code a procedure named CMPROC1 that consists of the following step: //CM1000 //CMMAST //CMTRANS //CMRPT DD DD DD DD PGM=CM1000 DSN=MSYS.CM.MASTER,DISP=SHR DSN=MSYS.CM.TRANS,DISP=SHR SYSOUT=A Instead of identifying a specific data set for the CMTRANS DD statement, allow the user to specify the name of the transaction file to be processed by coding the parameter TRANS=name on the EXEC statement that invokes the procedure, like this: // EXEC CMPROC1,TRANS=MM01.CM.TRANS 3. Code a JCLLIB statement that allocates MM01.PROCLIB as a private procedure library, then indicate the position in the job stream below where you would insert the JCLLIB statement. 1--> //MM01E8C JOB 36512,'X XXXXXXX',NOTIFY=userid 2--> //STEP1 EXEC PRINT 3--> 4. Suppose that the DD statement for a data set named EGA.CUSTOMER.EXTRACT resides in the member named X401EXTR in a private procedure library. Code an INCLUDE statement that includes this DD statement in a job stream. D:\219468807.doc 13 of 28 07/11/2016 2:13 PM METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 3 OBJECTIVE: to familiarize the student with use of in-stream procedures. Recode problem 2 making the IEBGENER step an in-stream procedure. Follow the instructions given in Exercise 2, page 275 in the previous edition of the text. To wit: Code a procedure named PRINT that invokes the IEBGENER utility to print a cataloged data set. Allow the user to specify the name of the data set to be printed by coding the parameter DSN=name on the EXEC statement that invokes the procedure, like this: // EXEC PRINT,DSN=SYDOE.ENGR.SAMPLE The job will contain the following: 1.The code for the in-stream procedure. 2.The code to execute the IEBUPDTE program to create a temporary PDS and put member JCLxxx in it. (Same as problem 2). 3.The code to execute the in-stream procedure that will print member JCLxxx of the temporary PDS. D:\219468807.doc 14 of 28 07/11/2016 2:13 PM METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 3 (REVISED) OBJECTIVE: to familiarize the student with use of symbolic parameters and the DDNAME parameter in procedures. Make the following changes to the proc in PROBLEM 3: 1. Include both the IEBUPDTE and IEBGENER steps in the in-stream procedure. (Remember that procs cannot contain in-stream data). 2. Make the PARM value a symbolic parameter. Give it a default value of ‘OLD’. 3. Use the DDNAME parameter for the SYSIN data set in the IEBUPDTE step. 4. Execute the procedure overriding the PARM default value with a value of ‘NEW’. Code the in-stream data set using the DDNAME value. D:\219468807.doc 15 of 28 07/11/2016 2:13 PM Chapter 10 How to process jobs conditionally Exercises 1. Code an EXEC statement with a COND parameter that executes a program named PPZ0050 if the condition code from the job step named STEP1 is 4 or less. 2. Code a JOB statement with a COND parameter that will terminate if any job step has a return code of 8 or a return code of 12 or greater. 3. Code a series of JCL statements that includes IF/THEN, ELSE, and ENDIF statements to execute a program named PPZ0100 if the condition code from the step named STEP1 is 4 or less; otherwise, execute the program named PPZ0200. D:\219468807.doc 16 of 28 07/11/2016 2:13 PM Chapter 11 How to use RESTART and other program execution facilities Exercises 1. Code a JOB statement for a job named ACCT01 with a RESTART parameter that restarts the job at job step ACCT01R. 2. Code a JOB statement with a RESTART parameter that restarts a job at proc step AP1030 in procedure ACCT02P. 3. Code the RD parameter on an EXEC statement that will automatically restart a program named KZB0100 with no checkpoints after a system failure. 4. Code an EXEC statement that executes a program named KZB0200 and specifies that the step should execute with performance group 50. 5. Code the JCL COMMAND to send the message "YOUR JOB BLEW UP!" to user MM03 via the operator. D:\219468807.doc 17 of 28 07/11/2016 2:13 PM Chapter 12 How to manage generation data groups Exercises 1. In the following job stream, fill in the missing blanks: //jobname JOB 36512,'X XXXXXXX',NOTIFY=userid //EXTRU EXEC PGM=TRUNEV //TRUDATA DD * (input data) //TRUFILE DD DSN=______________, Current generation of X401.MASTER // DISP=SHR //TRUFILE2 DD DSN=______________, New generation of X401.MASTER // DISP=(NEW,CATLG), // UNIT=SYSDA,VOL=SER=TSO001, // SPACE=(CYL,(100,5)), // DCB=(MODLDSCB,LRECL=1300,BLKSIZE=1300,RECFM=F) //RPTTRU EXEC PGM=TRPT001 //TRUFILE DD DSN=______________, Generation created in previous step // DISP=OLD //TRURPT DD SYSOUT=A 2. Code a job that creates a model DSCB and defines a generation data group. The generation data group is named X401.PROJ.JOURNAL and resides on a SYSDA volume named TSO001. Allow for up to 10 generations, and scratch the oldest generation when a new generation is created (assuming that 10 generations already exist). In the model DSCB, do not specify any DCB options. 3. Code a DD statement that creates a new generation of a GDG data set called X401.TRANS that has a primary allocation of 5 cylinders and a secondary allocation of 1 cylinder. The data set should also have a record length of 500 bytes and use a general-purpose model DSCB called GENERIC.TRANS. 4. Code a job that lists GDG catalog information for GDG X401.MASTER. D:\219468807.doc 18 of 28 07/11/2016 2:13 PM Chapter 13 How to use the SMS facilities for data set allocation Exercises 1. Code a DD statement that creates a new cataloged data set named X401.PROJ.MASTER. The data set should be assigned to storage class X400S1, data class X400D3, and management class X400M1. 2. Code a DD statement that creates a new cataloged data set named X401.PROJ.EXTR that has a primary allocation of 5000 records, a secondary allocation of 2000 records, resides on a SYSDA volume named TSO001, and specifies that all other data set attributes are to be copied from a data set named X401.MODEL.EXTR. Each record in the file is 500 bytes. 3. Modify the DD statement from answer 2 so that the data set has a primary allocation of 5 million records, a secondary allocation of 2 million records and specifies that all other data set attributes are to be copied from the data set with ddname TRANS in a job step named STEP2. D:\219468807.doc 19 of 28 07/11/2016 2:13 PM Chapter 15 How to use JCL for VSAM data sets Exercises 1. Code a JCL statement that allocates an existing VSAM data set named X401.PROJ.EXTR for shared access. 2. Code a JCL statement that allocates a DUMMY file for a program that expects a VSAM file. 3. Code a JCL statement for a system on which SMS is installed to create a new VSAM data set named X401.PROJ.MASTER on a SYSDA volume named TSO001. The file is a keysequenced data set with 240-byte records and keys in the first 9 bytes of each record. The file will require 30 cylinders of primary space and 15 cylinders of secondary space. D:\219468807.doc 20 of 28 07/11/2016 2:13 PM Chapter 16 How to use Access Method Services (AMS) Exercises 1. Code a DEFINE CLUSTER statement to create a new VSAM data set named X401.PROJ.MASTER on a volume named TSO001. The file is a key-sequenced data set with 240-byte records and keys in the first 9 bytes of each record. The file will require 30 cylinders of primary space and 15 cylinders of secondary space. Assign the names X401.PROJ.MASTER.DATA and X401.PROJ.MASTER.INDEX to the data and index components. 2. Code an AMS LISTCAT statement to list all VSAM data sets that begin with the high-level qualifier X401. 3. Code an AMS ALTER statement to change the SHAREOPTIONS parameter for the file defined in exercise 1 to SHAREOPTIONS (2, 3). 4. Code an AMS PRINT statement to print the file defined in exercise 1 in both character and hex format. 5. Code an AMS REPRO job to copy the first 50 records of the file defined in exercise 1 to a similarly-defined file named X401.PROJ.TEST. 6. Code an AMS DELETE job to delete the file defined in exercise 1. 7. Code a DEFINE ALTERNATEINDEX statement to define an alternate index file named X401.PROJ.MASTER.AIX for the VSAM file coded in exercise 1. The key for this alternate index is unique and occurs in bytes 8 though 11 of each record. The file will require 1 cylinder of primary space and 1 cylinder of secondary space. This file should also be added to the upgrade set of the base cluster. 8. Code a DEFINE PATH statement for the alternate index coded in exercise 7. The path name is X401.PROJ.MASTER.AIX.PATH. This command should also include the necessary code to update the upgrade set whenever the base cluster is processed by an alternate key. 9. Code a BLDINDEX statement to build the alternate index defined in exercise 7. D:\219468807.doc 21 of 28 07/11/2016 2:13 PM METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 5 OBJECTIVE: To familiarize the student with the IDCAMS utility program. 1. Use step 1 from problem 2 to create a temporary data set with 11 records in it. Pass this data set to step 2. 2. In step 2, code the statements needed to print the data set using the IDCAMS utility program. See pages 370 and 371 (pages 309 and 310 in the previous edition) for the JCL requirements. See pages 394 and 395 (pages 340 and 341 in the previous edition) for the control card requirements. D:\219468807.doc 22 of 28 07/11/2016 2:13 PM Chapter 17 How to use JCL procedures to compile and test programs Exercise 1. Code a job that compiles and link-edits a member named X401RPT in a source library named X401.MASTER.COBOL and stores the resulting load module in X401.MASTER.LOAD. Any copy members required by the program are contained in X401.COPYLIB.COBOL or SYS3.COPYLIB.COBOL, and the program may call subprograms contained in X401.MASTER.OBJLIB or SYS3.COBOL.OBJLIB. The compile-and-link procedure resides in library SYS1.IGY.SIGYPROC. D:\219468807.doc 23 of 28 07/11/2016 2:13 PM Chapter 18 How to use the OS/390 utility programs Exercises 1. Code an IEBGENER job to copy a cataloged data set named X401.JOURNAL to a new file named X401.JOURNAL.OLD on a SYSDA volume named TSO001. Allocate 10 cylinders of primary space and 2 cylinders of secondary space. 2. Code an IEHMOVE job to copy a cataloged data set named X401.JOURNAL on a SYSDA volume named LIB001 to a new file named X401.JOURNAL.OLD on a SYSDA volume named LIB002. 3. Code an IEBPTPCH job to print a data set named X401.JOURNAL. 4. Code an IEBCOPY job to compress a partitioned data set named X401.MASTER.COBOL. 5. Code an IEHLIST job to list VTOC entries for the file named X401.JOURNAL, including detailed DSCB information. The file resides on the SYSDA volume TSO001. 6. Code an IEBCOMPR job to compare two cataloged data sets named X401.JOURNAL and X401.JOURNAL.OLD. 7. Code an IEBDG job to create a sequential data set named X401.MASTER.TEST with 150byte records on SYSDA volume TSO001. The records should be created with the following two fields: Field name Positions Format Test data type CUSTNO 1-5 Zoned decimal Sequence numbers starting with 00001 and incremented by 1 for each record DATA 6-150 Alphanumeric Rippled Generate 5000 records. Allocate space by records to ensure that the correct amount of space is allocated to the data set. D:\219468807.doc 24 of 28 07/11/2016 2:13 PM Chapter 19 How to use the sort/merge utility Exercises 1. Code a standalone sort job that sorts the cataloged file X401.JOURNAL into ascending sequence using the first 18 characters of each record as the sort key. The output file should be named X401.JOURNAL.SORT, and it should be assigned 15 cylinders of primary space and 5 cylinders of secondary space on SYSDA volume TSO001. Allocate 30 cylinders of primary space and 10 cylinders of secondary space on a non-specific SYSDA volume for the sort work files. 2. Code the JCL necessary to invoke a COBOL program named X401RPT that requires an internal sort. The program requires the following two DD statements: X401JRNL: A cataloged input file named X401.JOURNAL X401RPT: Report output assigned to SYSOUT=A The sort modules are located in SYS1.SORTLIB. Allocate 30 cylinders of primary space and 10 cylinders of secondary space on a non-specific SYSDA volume for the sort work file. D:\219468807.doc 25 of 28 07/11/2016 2:13 PM METROPOLITAN COMMUNITY COLLEGE CPT 115—IBM MVS Job Control Language JCL PROBLEM 4 OBJECTIVE: To familiarize the student with the SORT utility and the use of in-stream procedures. 1.Code a two step in-stream procedure. The first step will execute the SORT utility. The second step will execute IEBGENER to print out the sorted data set. 2.Use step 1 from problem 2 to create a temporary PDS and add a member, JCLxxx, to it. 3.Execute the in-stream procedure to sort the member JCLxxx of the temporary PDS into a temporary output file. The records are to be sorted into ascending order by employee number. The second step of the procedure will use IEBGENER to print out the sorted file. 4.Execute the in-stream procedure again to sort the member by last name (major key field) and first name (minor key field) and then print it again. D:\219468807.doc 26 of 28 07/11/2016 2:13 PM Chapter 20 How to use TSO, CLIST, and REXX Exercises 1. Code a TSO command that will copy data set MM01.PROD.DATA to MM01.TEST.DATA. 2. Create a CLIST that runs an order processing program called ORDPRC1. The program will read in two input files and produce one report. The first input file is ORDER.DATA with a ddname of ORDERS. The second input file is INV.DATA with a ddname of INVTRY. The ddname for the report is ORDRPT and it produces a SYSOUT data set. The CLIST should also release any data sets once the program ends. 3. Create a REXX procedure that executes the same program described in question 2. D:\219468807.doc 27 of 28 07/11/2016 2:13 PM Chapter 21 How to use UNIX System Services Exercises 1. Code a TSO command that copies a PDS member called MM01.PROD.DATA(ORDERS) to an HFS file called /usr/data/orders.data. The data is text based and should be converted from EBCDIC to ASCII. 2. Code an OS/390 UNIX shell command that will move a file named Customer.data from directory /usr/data to directory /usr/backup. 3. Use the IKJEFT01 utility program to copy an HFS file to another HFS file. The input file is called /usr/data/Daily.Trans with a ddname of TRANSIN, and the output file is called /usr/data/Daily.Trans.copy with a ddname of TRANSOUT. The file attributes for the new file should allow the owner to read, write, and execute the file and any users within the same group should have the ability to read the file. 4. Code a job that uses the BPXBATCH utility to perform the same move command performed in question 2. You can name the job output and error files anything you’d like. D:\219468807.doc 28 of 28 07/11/2016 2:13 PM