The test data (about 1000 records) are instream, but must first be copied to a tape (any tape) using program IDCAMS. Do not keep this tape after job ends.
Next use the catalogued procedure COBOLCLG to compile, linkedit and test the program. The source program is in-stream.
The DDname for the test data is TAPEDATA. The program being tested will output a tape file, which should be catalogued for future use, using source code as follows:
SELECT MAST-FILE ASSIGN TO MSTOUT20. FD MAST-FILE RECORD CONTAINS 100 CHARACTERS BLOCK CONTAINS 0 RECORDS ORGANIZATION IS SEQUENTIAL.
The program will also read a tape file called PRODLIST from tape #201111 (ANSI labels, DDname LSTIN), and print about 600 lines of output on DDname PRINTOP
Print out the tape records after the test to permit verification, using IDCAMS. Hold this printout in the spool Q for later viewing by TSO.
CLASS A - no tapes, no special forms - maximum 500 prt lines, 10 mins run time CLASS B - 1 tape, special forms allowed - maximum 500 prt lines, 10 mins run time CLASS C - no tapes, no special forms - maximum 5000 prt lines, 1 hour run time CLASS D - 2 tapes, no special forms - maximum 5000 prt lines, 1 hour run time CLASS E - 2 tapes, special forms allowed - no prt line maximum, no run time limit
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 - never printed - hold for viewing via TSO
Code all JCL for a job which will compile, link edit, and test an instream COBOL source program. Use account number 2111HW for the job, and your name as programmer name. Ensure that JCL messages from MVS contain full detail, except that the listing of procs is not required. Request highest priority within the job queue, but for now, request JES to verify correctness of JCL without running the job.
The test data (about 1000 records, instream) should first be copied to tape #211111, using IDCAMS, as the COBOL program expects tape input. This tape should be kept but not catalogued at end of job, and should have ANSI labels.
Next use the COBCLG procedure to compile and test the COBOL program. It will read the source program (instream) from COB.SYSIN.
The COBOL program will read the tape records from DDname TPIN, and update a catalogued disk master file called TSTMAST using DDname UPDTDSK. It will also create a transaction log, and produce printout on DDname PRINT, which we will access from TSO. The transaction log will contain one record for each transaction from the input tape, and should be written to tape #212222 and catalogued for future use. The COBOL for this data set is coded as follows:
SELECT TRANS-LOG ASSIGN TO XACTLG21. FD TRANS-LOG RECORD CONTAINS 20 CHARACTERS BLOCK CONTAINS 0 RECORDS ORGANIZATION IS SEQUENTIAL.
After the test, use IDCAMS to display the transaction log on the printer.
Note - assume unit names, job and spool classes as per previous example.