SARGRW Examples

The following examples illustrate how to use the SARGRW control statements to produce listings.
view
The following examples illustrate how to use the SARGRW control statements to produce listings.
Example 1
The following statements, which are located in SARGRW01 in CAI.CVDEJCL, produce a listing similar to the SARBCH /LIST (that contains SYSOUT ID, job name, job ID, generation number, sequence number, archival date, archival time, location, lines, pages, block count, exception code, tape sequence number, and DR tape sequence number). The listing contains reports that were archived today.
//EXAMPLE1 JOB ACCOUNT,PROGRAMMER //* //* SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW EXEC PGM=SARGRW //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //PRTFILE DD SYSOUT=* //* //* SAMPLE CONTROL STATEMENTS TO GENERATE A REPORT SIMILAR TO //* SARBCH /LIST WHICH CONTAINS SYSOUT ID, JOB NAME, JOB //* ID, GENERATION NUMBER, SEQUENCE NUMBER, ARCHIVAL //* DATE, ARCHIVAL TIME, LOCATION, LINES, PAGES, DISK //* BLOCKS, EXCEPTION CODE, TAPE SEQUENCE NUMBER, AND //* DR TAPE SEQUENCE NUMBER. THE LISTING CONTAINS //* REPORTS THAT WERE ARCHIVED TODAY. //* //SYSIN DD * /CONTROL DATABASE=VIEW.SYSTEM1 RULER=YES /SELECT ARCHDATE = -0 /TITLE 'Listing of Sysouts' /PRINT ID 'ID' /PRINT JOBNAME 'Jobname' /PRINT JOBID 'Jobid' /PRINT EDIT(GEN,'zzzz9') ' Gen' /PRINT EDIT(SEQ,'zzzz9') ' Seq' /PRINT ARCHDATE 'Arc Date' /PRINT ARCHTIME 'Arc Time' /PRINT LOC 'Loc' /PRINT EDIT(LINES,'ZZZZZZZZ9') ' Lines' /PRINT EDIT(PAGES,'ZZZZZZZ9') ' Pages' /PRINT EDIT(DISKBLKS,'ZZZZZZ') 'Blocks' /PRINT XCODE 'Xcode' /PRINT EDIT(TAPESEQ,'ZZZZZ') ' Tseq' /PRINT EDIT(DRSEQ,'ZZZZZ') 'DRseq' /* //
Example 1 Output
The following panel illustrates the report produced by Example 1:
05/09/2014 18:20:15 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 Listing of Sysouts ID Jobname Jobid Gen Seq Arc Date Arc Time Loc Lines Pages Blocks Xcode Tseq DRseq -------------------------- -------- -------- ----- ----- ---------- -------- ---- -------- ------- ------ ------- ----- ----- ASTALLEG ASTALLEG JOB05544 86 7 05/09/2014 13:42:01 DISK 24 6 1 BSPURRI1 BSPURRI1 JOB05668 86 5 05/09/2014 13:37:10 DISK 13894 2534 0016 GTHDEMO-R01 HASGADM1 JOB12795 86 1 05/09/2014 15:17:12 TAPE 1046 41 0 34 12 HASGAINI HASGAINI JOB26529 86 1 05/09/2014 15:51:02 PTAP 352 9 0 34 12
Example 2
The following statements, which are located in SARGRW02 in CAI.CVDEJCL produce a report of backup tapes. The report of backup tapes contains tape sequence number, tape dataset name, number of tape blocks, highest generation number on tape, lowest generation number on tape, last file on tape, next tape sequence number, previous tape sequence number, tape unit, tape volume serial number, and field indicating whether the tape is cataloged.
//EXAMPLE2 JOB ACCOUNT,PROGRAMMER //* //* SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW EXEC PGM=SARGRW //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //PRTFILE DD SYSOUT=* //* //* SAMPLE CONTROL STATEMENTS TO GENERATE A REPORT CONTAINING //* TAPE SEQUENCE NUMBER, TAPE DATASET NAME, NUMBER OF //* TAPE BLOCKS, HIGHEST GENERATION NUMBER OF TAPE, //* LOWEST GENERATION NUMBER ON TAPE, LAST FILE ON TAPE, //* NEXT TAPE SEQUENCE NUMBER, PREVIOUS TAPE SEQUENCE //* NUMBER, TAPE UNIT, TAPE VOLUME SERIAL NUMBER, AND //* INDICATOR WHETHER TAPE IS CATALOGUED. //* //SYSIN DD * /CONTROL DATABASE=VIEW.SYSTEM1 RULER=YES /TITLE 'Listing of Backup Tapes' /PRINT EDIT(TAPESEQ,'ZZZZ9')        'Tape#' /PRINT TAPEDSN                      'Tape dataset name' /PRINT EDIT(TAPEBLKS,'ZZZZZZZZZ9')  ' Blocks' /PRINT TAPECDAT                     'Created' /PRINT EDIT(TAPEHGEN,'ZZZZ9')       ' HGEN' /PRINT EDIT(TAPELGEN,'ZZZZ9')       ' LGEN' /PRINT EDIT(TAPELTM,'ZZZZZZZZZ9')   'Last File' /PRINT EDIT(TAPENSEQ,'ZZZZZ')       ' Next' /PRINT EDIT(TAPEPSEQ,'ZZZZZ')       ' Prev' /PRINT TAPEUNIT                     'Unit' /PRINT TAPEVOL                      'Volume' /PRINT TRANS(TAPECAT,'N',' No ',                       * ,' Yes') 'Catlg' /END /* //
Example 2 Output
The following panel illustrates the report produced by Example 2:
05/09/2014 18:20:15 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 Listing of Backup Tapes Tape# Tape dataset name Blocks Created HGEN LGEN Last File Next Prev Unit Volume Catlg ----- -------------------------------------------- ---------- ---------- ----- ----- ---------- ----- ----- -------- ------ ----- 30 VIEW.SYSTEM1.SARTAPE.T0000030 13754 05/05/2014 82 81 1121 VTAPE 580637 Yes 31 VIEW.SYSTEM1.SARTAPE.T0000031 1281 05/06/2014 83 83 214 VTAPE 291451 Yes 32 VIEW.SYSTEM1.SARTAPE.T0000032 883 05/07/2014 84 84 183 VTAPE 273100 Yes 33 VIEW.SYSTEM1.SARTAPE.T0000033 308 05/08/2014 85 85 53 VTAPE 563331 Yes 34 VIEW.SYSTEM1.SARTAPE.T0000034 384 05/09/2014 86 86 80 VTAPE 582351 Yes 30 VIEW.SYSTEM1.SARDPLX.T0000030 13754 05/05/2014 82 81 1121 VTAPE 580639 No 31 VIEW.SYSTEM1.SARDPLX.T0000031 1281 05/06/2014 83 83 214 VTAPE 291460 Yes 32 VIEW.SYSTEM1.SARDPLX.T0000032 883 05/07/2014 84 84 183 VTAPE 273101 Yes 33 VIEW.SYSTEM1.SARDPLX.T0000033 308 05/08/2014 85 85 53 VTAPE 563332 Yes 34 VIEW.SYSTEM1.SARDPLX.T0000034 384 05/09/2014 86 86 80 VTAPE 582352 Yes 8 VIEW.SYSTEM1.SARDRTP.T0000008 13754 05/05/2012 82 81 1121 CART DR1823 Yes 9 VIEW.SYSTEM1.SARDRTP.T000009 1281 05/06/2014 83 83 214 CART DR1944 Yes 10 VIEW.SYSTEM1.SARDRTP.T0000010 883 05/07/2014 84 84 183 CART DR2011 Yes 11 VIEW.SYSTEM1.SARDRTP.T0000011 308 05/08/2014 85 85 53 CART DR2035 Yes 12 VIEW.SYSTEM1.SARDRTP.T0000012 384 05/09/2014 86 86 80 CART DR2152 Yes
Example 3
The following statements, which are located in SARGRW03 in CAI.CVDEJCL, produce a
View
accounting report. The accounting report contains report ID, job name, job ID, archival date, archival time, generation, blocks, lines, and pages of each report that is grouped by the user account that is associated with each report. The total number of blocks, lines, and pages are then calculated for each user account.
//EXAMPLE3 JOB ACCOUNT,PROGRAMMER //* //* SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW EXEC PGM=SARGRW //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //PRTFILE DD SYSOUT=* //* //* SAMPLE CONTROL STATEMENTS TO GENERATE A REPORT CONTAINING //* REPORT ID, JOBNAME, JOB ID, ARCHDATE, ARCHTIME, GEN, BLOCKS //* LINES, AND PAGES OF EACH REPORT. THE REPORTS ARE GROUPED //* BY USER ACCOUNT AND THE COMBINED BLOCK, LINE, AND PAGE //* TOTALS ARE PRINTED FOR EACH ACCOUNT. //* //SYSIN DD * /CONTROL DATABASE=VIEW.SYSTEM1 LINECNT=56 /TITLE 'CA View Accounting Report' /DEFINE ACCT CHAR(1) /DEFINE PREVACCT CHAR(20) /DEFINE ABLKS PACK(6) /DEFINE ALINES PACK(6) /DEFINE APAGES PACK(6) /SORT ACCTFLD /IF ACCTFLD NE PREVACCT / IF ACCT NE ' ' / PRINT 'Total For Account '||PREVACCT COL(1) SKIP(3) / PRINT EDIT(ABLKS,'ZZZZZ9') COL(99) / PRINT EDIT(ALINES,'ZZZZZZZZ9') COL(106) / PRINT EDIT(APAGES,'ZZZZZZZ9') COL(116) / PRINT PAGE / END / SET ABLKS = 0 / SET ALINES = 0 / SET APAGES = 0 / SET PREVACCT = ACCTFLD /END /SET ACCT = 'A' /SET ABLKS = ABLKS+DISKBLKS /SET ALINES = ALINES+LINES /SET APAGES = APAGES+PAGES /PRINT ACCTFLD 'User Account' /PRINT ID 'ID' /PRINT JOBNAME 'Job Name' /PRINT JOBID 'Job ID' /PRINT ARCHDATE 'Arch Date' /PRINT ARCHTIME 'Arch Time' /PRINT EDIT(GEN,'ZZZZ9') ' Gen' /PRINT EDIT(DISKBLKS,'ZZZZZ9') 'Blocks' /PRINT EDIT(LINES,'ZZZZZZZZ9') ' Lines' /PRINT EDIT(PAGES,'ZZZZZZZ9') ' Pages' /ON ENDDATA / IF ACCT NE ' ' / PRINT 'Total For Account '||PREVACCT COL(1) SKIP(3) / PRINT EDIT(ABLKS,'ZZZZZ9') COL(99) / PRINT EDIT(ALINES,'ZZZZZZZZ9') COL(106) / PRINT EDIT(APAGES,'ZZZZZZZ9') COL(116) / END /END
Example 3 Output
The following panel illustrates the report produced by Example 3:
06/11/2014 16:44:02 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 CA View Accounting Report User Account ID JOBNAME JOB ID ARC DATE ARC TIME GEN BLOCKS LINES PAGES --------------------- ------------------------------ -------------------- -------------- ------------------ ----------------- - 41000000 QAJOB001-01 QAJOB001 J0100052 01/31/2005 15:53:41 1790 2 542 13 41000000 QAVIEW02-01 QAVIEW02 J0100090 10/02/2006 13:35:12 2399 2 542 13 41000000 QAVIEW03-01 QAVIEW03 J0100091 10/02/2006 13:35:17 2399 1 172 4 41000000 QAVIEW03-02 QAVIEW03 J0100091 10/02/2006 13:35:17 2399 1 165 3 41000000 REXX-RPT1 HB16REXX JOB04442 12/14/2000 09:05:56 281 7 1230 30 41000000 RPT-ATTS HB17ATTS J0100055 01/31/2005 15:55:11 1790 2 542 13 41000000 VTEST09 ROSRV20 JOB01301 06/19/2000 13:04:53 103 4 610 10 41000000 X2TEST-RP1 QAHA20R1 JOB01147 03/09/2000 15:20:39 1 5 1100 100 TOTAL FOR ACCOUNT 41000000 24 4903 186
Example 4
The following statements, which are located in SARGRW04 in CAI.CVDEJCL, produce a report containing a list of reports that the ARCHCHG feature modified. The ARCHCHG report contains the report ID, archival date, archival time, reader date, reader time of each modified report.
//EXAMPLE4 JOB ACCOUNT,PROGRAMMER //* //* SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW EXEC PGM=SARGRW //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //PRTFILE DD SYSOUT=* //* //* Sample Control Statements to generate a report containing //* SYSOUTS that have been modified by the ARCHCHG //* Feature. This report will list the Report ID, Archive //* Date, Archive Time, Reader Date, and Reader time. //* //* //SYSIN DD * /CONTROL DATABASE=VIEW.SYSTEM1 RULER=YES LINECNT=2000 /TITLE 'CA View Modified Archdate Report' /SELECT CHGDATE- = ‘Y’ /PRINT ID 'ID' /PRINT ARCHDATE 'Archive Date' /PRINT ARCHTIME 'Archive Time ' /PRINT RDRDATE 'Reader Date' /PRINT RDRTIME 'Reader Time' ' /END /* //
Example 4 Output
The following panel illustrates the report produced by Example 4:
06/17/2014 16:48:31 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 CA View Modified ARCHDATE Report ID Archive Date Archive Time Reader Date Reader Time ----------------------------------------------------------- -------------------------- ------------------------- ---------------------- ZDRIVER1 06/10/2001 10:56:04 06/09/2014 14:51:02 MFMVD-26766-DYNAM#2 COMPLETE 06/10/2001 10:56:04 10/04/2013 15:00:51 MFMVD-26766-NON-DYNAM #01 06/10/2001 10:56:04 10/04/2013 15:00:55 VIEW2B1 06/10/2001 10:56:04 06/22/2004 15:25:20 WAJOB003-3 06/10/2001 10:56:04 04/09/2013 08:38:08 XAJOB003-4 06/10/2001 10:56:04 04/09/2013 08:38:08 ZDRIVER2 06/10/2001 10:56:04 06/10/2004 10:56:43
Example 5
The following statements,which are located in SARGRW05 in CAI.CVDEJCL, produce a report containing a list of UNDEF reports that have been archived on or after the specified year ‘YYYY’. The UNDEF report list contains the archival date, archival time, report ID, class, forms, destination, copies, job ID, job name, lines, and pages of each UNDEF report. The list is sorted in descending order by the archival date.
//EXAMPLE5 JOB ACCOUNT,PROGRAMMER //* //* SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW EXEC PGM=SARGRW //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //PRTFILE DD SYSOUT=* //* //* SAMPLE CONTROL STATEMENTS TO GENERATE UNDEF REPORTS CONTAINING //* ARCHDATE, ARCHTIME, ID, CLASS, FORMS, DEST, COPIES, JOB ID, //* JOB NAME, LINES, AND PAGES OF ALL UNDEF REPORTS ARCHIVED //* ON OR AFTER A CERTAIN YEAR. THE ‘YYYY’ IN THE ‘IF’ STATEMENT BELOW //* MUST BE CHANGED TO A VALID YEAR PRIOR TO EXECUTION. //* //SYSIN DD * /CONTROL DATABASE=VIEW.SYSTEM1 /TITLE 'CA View UNDEF Report' /SELECT ID EQ 'UNDEF' /DEFINE CNT BIN /SORT ARCHDATE-D /IF ARCHDATE GE YYYY / PRINT ARCHDATE 'Arc Date' / PRINT ARCHTIME 'Arc Time' / PRINT ID 'ID' / PRINT CLASS 'Class' / PRINT FORMS 'Forms' / PRINT DEST 'Dest' / PRINT COPIES 'Copies' / PRINT JOBID 'Job ID' / PRINT JOBNAME 'Job Name' / PRINT LINES 'Lines' / PRINT PAGES 'Pages' / SET CNT = CNT+1 / END /END /ON ENDDATA / PRINT 'TOTAL REPORTS='||CNT COL(1) /* //
Example 5 Output
The following panel illustrates the report produced by Example 5:
06/11/2014 11:28:12 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 CA View UNDEF Report Arc Date Arc Time ID Class Forms Dest Copies Job ID Job Name Lines Pages --------------------- -------------------- --------- ------------ ------------- ------------------ -------------- ---------------- -------- 06/09/2014 10:57:44 UNDEF N VIEW XXXX 1 JOB38024 RPTS0002 52 2 06/01/2014 12:17:53 UNDEF B ACIF LOCAL 1 JOB42017 EXPLSTHA 160 8 07/04/2013 08:52:29 UNDEF A VIEW LOCAL 1 JOB26043 SC0301A 1280 64 04/09/2013 13:34:48 UNDEF A SLUG XXXX 1 JOB18312 UNEN0002 1285 65 06/18/2012 07:14:06 UNDEF P STD XXXX 1 JOB37893 CEKM0002 1386 49
Example 6
The following statements, which are located in SARGRW06 in CAI.CVDEJCL, produce a report containing a list of tapes and their contents. The report lists the report ID, job name, job ID, archival date, archival time, tape sequence, and tape position of each report on the tape. The list is sorted by tape sequence and tape position.
//EXAMPLE6 JOB ACCOUNT,PROGRAMMER                                      //*                                                             //*   SARGRW - GENERAL PURPOSE REPORT UTILITY                   //*                                                             //SARGRW   EXEC PGM=SARGRW                                      //STEPLIB  DD DSN=CAI.CVDELOAD,DISP=SHR         <=== MODIFY     //SYSPRINT DD SYSOUT=*                                          //SYSOUT   DD SYSOUT=*                                          //PRTFILE  DD SYSOUT=*                                          //*                                                             //* SAMPLE CONTROL STATEMENTS TO GENERATE A REPORT CONTAINING   //*        LIST OF TAPES AND THEIR CONTENTS. PRIMARY TAPES WILL //*        BE PRINTED FIRST FOLLOWED BY DUPLEX TAPES AND THEN   //*        DR TAPES.                                            //*                                                             //SYSIN    DD *                                                 /CONTROL DATABASE=VIEW.SYSTEM1                                           RULER=YES                                                       LINESIZE=133                                           /SELECT TAPESEQ > 0                                             /DEFINE TTYPE CHAR(1)                                           /SET TTYPE = TRANS(TAPETYPE,'P','0','D','1','R','2')            /SORT TTYPE TAPESEQ TAPEPOS                                     /IF TAPETYPE NE PREV(TAPETYPE) OR TAPESEQ NE PREV(TAPESEQ)      /   PRINT PAGE                                                  /END                                                            /TITLE 'Contents of Tape '||TAPEDSN                             /PRINT ID  'ID'                                                 /PRINT JOBNAME 'Job Name'                                        /PRINT JOBID   'Job ID'                                          /PRINT EDIT(GEN,'ZZZZ9') '  Gen'                                /PRINT EDIT(SEQ,'ZZZZ9') '  Seq'                                /PRINT ARCHDATE 'Arc Date'                                      /PRINT ARCHTIME 'Arc Time'                                      /PRINT EDIT(TAPESEQ,'ZZZZZZZZ') 'Tape Seq'                      /PRINT EDIT(TAPEPOS,'ZZZZZZZZ') 'Tape Loc'                      /*                                                                //                                  
Example 6 Output
The following panel illustrates the report produced by Example 6:
06/13/2014 09:52:44 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 Contents of Tape VIEW.SYSTEM1.SARTAPE.T0000008 ID Job Name Job ID Gen Seq Arc Date Arc Time Tape Sec Tape Loc ---------------------------------------------- ----------------- --------------- ---------------- ---------------- ----------------- HBB0ATTS-01 HBB0ATTS J0100081 2399 65535 10/02/2006 12:35:42 8 730 ICSFRPT1 ICSF0002 JOB42905 4378 65535 03/03/2012 07:50:53 8 737 ICSFRPT2 ICSF0002 JOB42905 4378 65535 03/03/2012 07:50:53 8 738 IQB0DK01 IQB0DK01 JOB53452 2317 65535 07/12/2006 17:08:54 8 747 KBR12345 SC0401B JOB18131 4377 65535 03/02/2012 10:52:18 8 760
Example 7
The following statements, which are located in SARGRW07 in CAI.CVDEJCL, produce a report containing a list of archived reports and the backup tapes that contain each report. For each report, the report ID, job name, job ID, generation, sequence, archival date, archival time, location, lines, and pages are printed, followed by the tape sequence and tape position for each backup tape that contains the report.
//EXAMPLE7 JOB ACCOUNT,PROGRAMMER  //* //* SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW   EXEC PGM=SARGRW //STEPLIB  DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT   DD SYSOUT=* //PRTFILE  DD SYSOUT=* //* //* SAMPLE CONTROL STATEMENTS TO GENERATE A REPORT CONTAINING //* A LIST OF ARCHIVED REPORTS AND THE BACKUP TAPES //* CONTAINING THE REPORTS. //* //SYSIN DD * /CONTROL DATABASE=VIEW.SYSTEM1          RULER=YES          LINESIZE=200 /TITLE 'Listing of Reports and Tapes' /DEFINE PRID CHAR(32) /DEFINE PGEN BIN(4) /DEFINE PSEQ BIN(4) /IF RID NE PRID OR GEN NE PGEN OR SEQ NE PSEQ /   PRINT SKIP(2) ID 'ID' /   PRINT JOBNAME 'Job Name' /   PRINT JOBID 'Job ID' /   PRINT EDIT(GEN,'ZZZZ9') ' Gen' /   PRINT EDIT(SEQ,'ZZZZ9') ' Seq' /   PRINT ARCHDATE 'Arc Date' /   PRINT ARCHTIME 'Arc Time' /   PRINT LOC 'Loc' /   PRINT EDIT(LINES,'ZZZZZZZZ9') ' Lines' /   PRINT EDIT(PAGES,'ZZZZZZZ9') ' Pages' /END /SET PRID = ID /SET PGEN = GEN /SET PSEQ = SEQ /PRINT TRANS(TAPETYPE,       'P',' Primary ',       'D',' Duplex ',       'R',' DRTape ',       * ,' ') 'Tape Type' COL(109) /PRINT EDIT(TAPESEQ,'ZZZZZ') ' TSeq' /PRINT EDIT(TAPEPOS,'ZZZZZZZZ') 'Tape Pos' /PRINT TAPEDSN 'Tape DSN' /END /* //                  
Example 7 Output
The following panel illustrates the report produced by Example 7:
06/13/2014 09:52:44 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 Listing of Reports and Tapes ID Job Name Job ID Gen Seq Arc Date Arc Time Loc Lines Pages Tape Type Tseq TPos Tape DSN ----------------------------------- ---------------- --------------- -------- --------- --------------- ------------------ ------------ -------- CEKMRPT1 CEKM0002 JOB42914 4378 65535 03/03/2012 07:54:53 PERM 1285 65 Primary 8 631 CHQA.HAC0XXXX.SARTAPE.T0000008 Duplex 8 631 CHQA.HAC0XXXX.SARDPLX.T0000008 DRtape 29 631 CHQA.HAC0XXXX.SARDRTP.T0000029 CEKMRPT2 CEKM0002 JOB42914 4378 65535 03/03/2012 07:54:53 PERM 1285 65 Primary 8 632 CHQA.HAC0XXXX.SARTAPE.T0000008 Duplex 8 632 CHQA.HAC0XXXX.SARDPLX.T0000008 DRtape 29 632 CHQA.HAC0XXXX.SARDRTP.T0000029
Example 8
The following statements are located in SARGRW08 in CAI.CVDEJCL. These statements produce a report containing a list of jobs. For each job in the report, the following data appear: job name, job ID, execution start date and time, execution end date and time, xcode, lines, pages, submit date and time, system, class, user ID, and user comments fields.
//EXAMPLE8 JOB ACCOUNT,PROGRAMMER //* //*        SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW   EXEC PGM=SARGRW //STEPLIB  DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT   DD SYSOUT=* //PRTFILE  DD SYSOUT=* //* //* SAMPLE CONTROL STATEMENTS TO GENERATE A REPORT CONTAINING //*       A LIST OF JOBS. //* //SYSIN    DD * /CONTROL DATABASE=VIEW.SYSTEM1          RULER=YES          LINESIZE=178 /TITLE 'Listing of Jobs' /PRINT JOBNAME 'Jobname' COL(1) /PRINT JOBID ' Jobid' /PRINT JOBEXSDT 'Start Date' /PRINT JOBEXSTM ' Time' /PRINT JOBEXEDT ' End Date' /PRINT JOBEXETM ' Time' /PRINT JOBXCODE 'Xcode' /PRINT EDIT(JOBLINES,'ZZZZZZZZ9') ' Lines' /PRINT EDIT(JOBPAGES,'ZZZZZZZ9') ' /PRINT JOBSUBDT ' Sub Date' /PRINT JOBSUBTM ' Time' /PRINT JOBSYSID ' System' /PRINT JOBCLASS 'Class' /PRINT JOBOWNER 'User ID' /PRINT JOBOWNER 'Assigned' /PRINT JOBCMNT 'User Comments' /* //
 
Example 8 Output
08/10/2015 11:50:26 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 Listing of Jobs Jobname Jobid Start Date Time End Date Time Xcode Lines Pages Sub Date Time System Class User ID Assigned User Comments -------- -------- ---------- -------- ---------- -------- ------ ----- ----- ---------- ------- -------- ----- -------- -------- ------------- ACOD040 JOB27835 04/29/2015 18:32:50 04/29/2015 18:32:50 0001 93 3 04/29/2015 18:32:49 SYS1 N USER01 DEFDJOB1 JOB35480 05/06/2015 15:03:11 05/06/2015 15:03:11 7680 384 05/06/2015 15:03:11 SYS1 N USER01 DEFDSTC JOB24382 06/05/2015 16:18:18 1365 66 06/05/2015 16:18:18 SYS1 N USER01 DEFDSTC JOB24267 06/05/2015 16:13:34 1365 66 06/05/2015 16:13:34 SYS1 N USER01 DEFDTES4 JOB02528 04/30/2015 09:06:52 04/30/2015 09:06:52 1280 64 04/30/2015 09:06:48 SYS1 N USER21 USER05 TEST COMMENTS RPTPRINT JOB20437 06/01/2015 09:00:23 06/01/2015 09:00:23 1280 64 06/01/2015 09:00:22 SYS1 N USER05 RPTPRINT JOB19983 06/01/2015 08:39:34 06/01/2015 08:39:34 JCLERR 1280 64 06/01/2015 08:39:33 SYS1 N USER01 RPTPRINT JOB19387 06/01/2015 08:16:42 06/01/2015 08:16:42 1280 64 06/01/2015 08:16:42 SYS1 N USER01 RPTS0001 JOB24815 06/05/2015 16:31:26 06/05/2015 16:31:28 1280 64 06/05/2015 16:31:20 SYS1 N USER01 USER32 RPTS0001 JOB24719 06/05/2015 16:28:56 06/05/2015 16:28:57 1280 64 06/05/2015 16:28:50 SYS1 N USER32 RPTS0001 JOB24499 06/05/2015 16:23:25 06/05/2015 16:23:25 3840 192 06/05/2015 16:23:24 SYS1 N USER01
Example 9
The following statements are located in SARGRW09 in CAI.CVDEJCL. These statements produce a report containing a list of jobs and datasets for each job. For each job in the report, the following data appear: job name, job ID, submit date/time, DDname, stepname, procstep, sysout ID, generation, and sequence fields.
//EXAMPLE9 JOB ACCOUNT,PROGRAMMER //* //* SARGRW - GENERAL PURPOSE REPORT UTILITY //* //SARGRW EXEC PGM=SARGRW //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR <=== MODIFY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //PRTFILE DD SYSOUT=* //* //* SAMPLE CONTROL STATEMENTS TO GENERATE A REPORT CONTAINING //* A LIST OF JOBS AND DATASETS ASSOCIATED WITH THE JOB. //* //SYSIN DD * /CONTROL DATABASE=VIEW.SYSTEM1 RULER=YES LINESIZE=156 /TITLE 'Listing of Jobs and Datasets' /DEFINE I BIN /PRINT JOBNAME 'Jobname' COL(1) /PRINT JOBID ' Jobid' /PRINT JOBSUBDT ' Sub Date' /PRINT JOBSUBTM ' Time' /PRINT JOBEXSDT 'Start Date' /PRINT JOBEXSTM ' Time' /PRINT JOBEXEDT ' End Date' /PRINT JOBEXETM ' Time' /DO I = 1 TO JOBNDS BY 1 / PRINT JOBDDNAM 'DDname' COL(79) / PRINT JOBSTEP 'Stepname' / PRINT JOBPROC 'Procstep' / PRINT JOBDSID 'DSID ' / PRINT ID 'Sysout ID' / PRINT EDIT(GEN,'ZZZZ9') ' Gen' / PRINT EDIT(SEQ,'ZZZZ9') ' Seq' / NEXT JOBDS /END /* //
Example 9 Output
Sample output for Example 9 follows:
08/10/2015 11:27:01 CA View (nn.n) Page 1 SARGRW VIEW.SYSTEM1 Listing of Jobs and Datasets Jobname Jobid Sub Date Time Start Date Time End Date Time DDname Stepname Procstep DSID Sysout ID Gen Seq -------- -------- ---------- -------- ---------- -------- ---------- -------- -------- -------- -------- ----- --------------- ----- ----- ACOD040 JOB27835 04/29/2015 18:32:49 04/29/2015 18:32:50 04/29/2015 18:32:50 JESMSGLG JES2 2 ACOD040 1232 237 JESJCL JES2 3 ACOD040 1232 237 JESYSMSG JES2 4 ACOD040 1232 237 DEFDJOB1 JOB35480 05/06/2015 15:03:11 05/06/2015 15:03:11 05/06/2015 15:03:11 SYSUT2 STEP1 101 DANRPT1 1232 517 SYSUT2 STEP2 106 DANRPT1 1232 517 SYSUT2 STEP3 111 DANRPT1 1232 517 SYSUT2 STEP1 116 DANRPT1 1232 517 SYSUT2 STEP2 121 DANRPT1 1232 517 SYSUT2 STEP3 126 DANRPT1 1232 517 DEFDSTC JOB24382 06/05/2015 16:18:18 06/05/2015 16:18:18 SYS00010 [email protected] 109 DEFDSTC 1232 555 DEFDSTC JOB24267 06/05/2015 16:13:34 06/05/2015 16:13:34 SYS00021 [email protected] 112 DEFDSTC 1232 550 DEFDTES4 JOB02528 04/30/2015 09:06:48 04/30/2015 09:06:52 04/30/2015 09:06:52 SYSUT2 STEP1 101 DEFDTES4 1232 352 RPTPRINT JOB20437 06/01/2015 09:00:22 06/01/2015 09:00:23 06/01/2015 09:00:23 SYSUT2 STEP1 101 PRTRPT1 1232 540 RPTPRINT JOB19983 06/01/2015 08:39:33 06/01/2015 08:39:34 06/01/2015 08:39:34 SYSUT2 STEP1 101 PRTRPT1 1232 539 RPTPRINT JOB19387 06/01/2015 08:16:42 06/01/2015 08:16:42 06/01/2015 08:16:42 SYSUT2 STEP1 101 PRTRPT1 1232 538 RPTS0001 JOB24815 06/05/2015 16:31:20 06/05/2015 16:31:26 06/05/2015 16:31:28 SYSUT2 STEP5 121 DEFDRPT5 1232 560 RPTS0001 JOB24719 06/05/2015 16:28:50 06/05/2015 16:28:56 06/05/2015 16:28:57 SYSUT2 STEP3 111 DEFDRPT3 1232 559 RPTS0001 JOB24499 06/05/2015 16:23:24 06/05/2015 16:23:25 06/05/2015 16:23:25 SYSUT2 STEP1 101 DEFDRPT1 1232 556 SYSUT2 STEP4 116 DEFDRPT4 1232 557 SYSUT2 STEP6 126 DEFDRPT6 1232 558