============================== MVS JCL Example 4 and Homework ============================== - Ian! D. Allen idallen@idallen.ca Based on an example by Harold Smith. Code all JCL for a job that will compile and test a COBOL program, using account code 04W$EX4, and your name as programmer name. First, use IDCAMS to copy about 1000 records of instream data to a disk dataset. Then, use the cataloged procedure COBOLCLG to compile, linkedit and test the program, as long as the IDCAMS step has executed with no errors. A listing (from SYS1.PROCLIB) of the contents of the COBOLCLG proc follows: //*** THIS IS THE COBOLCLG CATALOGED PROCEDURE ************* //COBOLCLG PROC //********************************************************** //COB2 EXEC PGM=IGYCRCTL,PARM=(LIST,OBJ),REGION=1024K //SYSPRINT DD SYSOUT=A //SYSLIB DD DSN=COBOL.SRCLIB,DISP=(SHR,KEEP) //SYSLIN DD DISP=(NEW,PASS),UNIT=DASD,BLKSIZE=4080, // SPACE=(4080,(100,100)) //********************************************************** //LKED EXEC PGM=IEWL,REGION=1024K //SYSPRINT DD SYSOUT=A //SYSLIB DD DSN=COBOL.OBJLIB,DISP=(SHR,KEEP) //SYSLIN DD DSN=*.COB2.SYSLIN,DISP=(OLD,DELETE) //SYSLMOD DD DSN=&&GOSET(GO),DISP=(NEW,PASS), // UNIT=DASD,SPACE=(1024,(500,100,1)) //********************************************************** //GO EXEC PGM=*.LKED.SYSLMOD,ADDRSPC=REAL,REGION=1024K //*** END OF COBOLCLG CATALOGED PROCEDURE ****************** The source program is in-stream, and should be compiled with option XREF, in addition to any options are already set in the proc. Change the library searched by the linkeditor to TEAM1.MODLIB. The test step should be limited to 1 minute and 30 seconds, and should be executed only if the compile step sets a condition code of 4 or less. It will require 64MB of virtual memory. The program being tested will read the test data from DDname TSTIN, and will create an output disk dataset of 5000 records that should be cataloged for future use. The COBOL source code for this disk data set is as follows: SELECT OUT-FILE ASSIGN TO TESTOUT. FD OUT-FILE RECORD CONTAINS 100 CHARACTERS BLOCK CONTAINS 0 RECORDS ORGANIZATION IS SEQUENTIAL. The program will also print about 400 lines of output on DDname TESTPRT. Send this to the laser printer; but, hold it for preview via TSO. Print out the disk records after the test to permit verification, using a program called PGMVIEW from private library TEAM1.LINKLIB, as long as no previous step has set a condition code of 4 or more. This program will read the disk from DDname INPUT and print to DDname OUTPUT. Hold this printout in the spool queue for later viewing by TSO. Assume that that all tapes are in group TAPES and all disks are in group DASD. Job scheduler classes for this lab and homework are as follows: CLASS A - no tapes, limit of 100K region - maximum 500 prt lines, 10 mins run time CLASS B - 1 tape, limit of 10M region - maximum 500 prt lines, 10 mins run time CLASS C - no tapes, limit of 100M region - maximum 5000 prt lines, 1 hour run time CLASS D - 2 tapes, limit of 100M region - maximum 5000 prt lines, 1 hour run time CLASS E - 3 tapes, no region limit - no prt line maximum, no run time limit JES printer spooling classes for this lab and homework are as follows: CLASS A - no special forms, maximum 500 prt lines CLASS B - no special forms, maximum 5000 prt lines CLASS C - special forms allowed, no prt line maximum CLASS D - no special forms - hold for viewing via TSO CLASS E - laser printer 500 prt lines CLASS F - laser printer unlimited prt lines ---------------------------- MVS JCL Example 4 - Homework ---------------------------- Code all JCL for a job that will compile, link edit and test an instream COBOL source program. Use account number 04W$HW4 for the job, and your name as the programmer name. The test data (about 10,000 records) will be generated by a program called TSTGEN, in private library TEAM1.PVTLIB. TSTGEN has no input dataset; but, it generates data based on PARM's. Our test run needs two PARM's: PAYROLL and HOURLY. Output (on DDname TSTOUT) should be to a disk dataset, which should be deleted after last use. (We're only testing!) The TSTGEN program DCB specifies 50 byte records, 4000 byte blocks, and sequential organization of the dataset. Next use the COBOLCLG procedure (as given in the example above) to compile and test the COBOL program, provided that the TSTGEN program of the previous step did not set a return code greater than 3. The compiler will read the source program (instream) from SYSIN. Hold the compiler listing output for TSO access. The compile step will also need COBOL source code from a library called TEAM1.SRCLIB. The linkedit step should read all needed subroutines from a library called Y2K.OBJLIB. The execution step of the proc should be limited to 30 seconds, and should be executed only if the compile step sets a condition code of less than 4. Compile the source program with options XREF and OBJ (only). The program being tested will need 4M of memory. The COBOL program will read the test data from DDname DATIN, and create a disk output dataset with the same number of records on ddanme DATOUT. This dataset should be cataloged for future use. It will also create a summary dataset (of about 1000 records) on tape #123456 using DDname SUMM. Ensure this tape has ANSI labels, as it is to be sent to another organization that does not use MVS. The COBOL for both datasets contains the following: RECORD CONTAINS 100 CHARACTERS BLOCK CONTAINS 0 RECORDS ORGANIZATION IS SEQUENTIAL. After the test, print the tape dataset using IDCAMS, as long as all previous steps have worked correctly. Ask for 2 copies on special form GRLN. Note: For this job, use the unit names, job and spool class definitions given at the end of the the previous example, above. Use the same PROC listing for the COBOLCLG proc as well.