Previous Topic: System Use Report Generation

Next Topic: User-Defined Reports


SYSOUT Information Processing

This section explains the method used by CA JARS to handle information about print lines and/or punch statements. Use of this data in the Report Writer is also explained.

Before we discuss CA JARS processing, it is important to understand the way JES and SMF work together to record SYSOUT activity. For batch jobs, all SYSOUT with the same SYSOUT class and forms identification are collected together in the JES spool. There is no distinction as to which DDNAME produces which print lines. All like SYSOUT is grouped together. When JES finds a printer that it can use to print a specific SYSOUT class and forms ID, then it prints all of the lines for an entire job that are of that class and ID.

Once the SYSOUT has been printed, one SMF type 6 record is written to record statistics for the batch job that originally created this SYSOUT. This record shows the totals for all printing performed. For example, if a batch job has three steps, each with two DDNAMEs going to SYSOUT class A, then one SMF type 6 record is written containing the total print lines for all six DDNAMEs in the job.

Base portion of                 Data for    Data for  Data for
the job record                  SYSOUT      SYSOUT    SYSOUT
(Bytes 1 through 608)           Class A     Class C   Class X
==============================|__________|__________|__________

The base record is created, then a Forms entry is added to the end of the record for each SMF type 6 record for this job. Since there may be multiple Forms entries for a single job, the records in the account file can be variable in length. In addition, some of the fields in the base portion of the record that are SYSOUT related, like Print Forms ID, are filled with blanks. Since there is more than one forms ID for the job, there is no way that all forms IDs could be carried in one field.

To illustrate the processing of records with forms entries, let's use a hypothetical job. This is the JCL for our job:

//JARSTEST JOB (B533,PRA,250),'JARS TEST',TIME=(1,31),
//        TYPRUN=HOLD
//STEP1   EXEC PGM=IEBGENER
//SYSPRINT  DD SYSOUT=A
//SYSIN     DD DUMMY
//SYSUT1    DD DSN=EDUC.JTF.CARDLIB(TESTMEM),
//             DISP=SHR
//SYSUT2    DD SYSOUT=X
//*******************************
//STEP2   EXEC PGM=JSIMAIN
//STEPLIB   DD DSN=CAI.CAJRLOAD,
//             DISP=SHR
//SYSOUT    DD SYSOUT=A
//CAIJSPRT  DD SYSOUT=A
//CAIJSNAP  DD SYSOUT=A
//CAIJSSMF  DD DSN=WEEKLY.SMF(0),
//             DISP=SHR
//CAIJSACT  DD DSN=&.&TEMP.,
//             UNIT=3350,
//             SPACE=(CYL,(5,1),RLSE)
//             DCB=(BLKSIZE=3000, BUFL=32760)
//SORTWK01  DD UNIT=3350,SPACE=(CYL,(2,1),RLSE)
//SORTWK02  DD UNIT=3350,SPACE=(CYL,(2,1),RLSE)
//SORTWK03  DD UNIT=3350,SPACE=(CYL,(2,1),RLSE)
//CAIJSCT1  DD UNIT=3350,SPACE=(TRK,5)
//CAIJSCT2  DD UNIT=3350,SPACE=(TRK,5)
//CAIJSPRT  DD SYSOUT=X
//CAIJSCIN  DD DSN=EDUC.JTF.CARDLIB(CNTLCARD),
//             DISP=SHR
//*******************************
//STEP3   EXEC PGM=IEHPROGM
//SYSPRINT  DD SYSOUT=A
//DISK1     DD DSN=EDUC.JARS.HISTORY(-1),
//             DISP=SHR
//SYSIN     DD DSN=EDUC.IEHPROGM.CNTLCARD,
//             DISP=SHR

All lines with SYSOUT=A are kept in one type 6 SMF record.

All lines with SYSOUT=X are kept in another type 6 SMF record.

The SMF data generated for this job includes three step termination records, one job termination record, and two type 6 records (SYSOUT). The account file records created by these SMF records look like this:

Step1 Record ==============================
Step2 Record ==============================
Step3 Record ==============================
                                             Class 'A'    Class 'X'
                                            Form Entry   Form Entry
Job Record   ==============================____________|____________

To illustrate the use of this data in reports, we will create a hypothetical report that includes only the print lines for SYSOUT class X. All other classes of SYSOUT are rejected. We do this by using the GROUP and GROUPC statements.

A person who does not understand how forms entries are handled by JES, SMF, and CA JARS, might code the grouping as follows:

1...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
5GROUP   4431 S
5GROUPC  1X

However, this would select no records, because position 443 is blank. The base portion of the record cannot be filled because there is more than one SYSOUT class for the job. The real information for the SYSOUT is in the forms entries at the end of the job record. To be able to access this data, a special grouping dynamically generates forms records. A forms record has the same layout as a step record, but since one forms record is built from each forms entry, SYSOUT-related fields in the base portion actually contain usable data.

The following grouping causes the dynamic generation of the forms records, and then does the necessary selection for the sample report.

1...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
5GROUP   0281  4434  2962 S
5GROUPC  1S       T       A
5GROUPC  1U               B
5GROUPC  2X               B
5GROUPC  3A      A9
5GROUPC  3BB

The key to understanding the processing technique for forms data is to understand the sequence of events caused by these grouping statements.

First, the records about the hypothetical job are in the account file in the order shown below.

Step1 Record ==============================
Step2 Record ==============================
Step3 Record ==============================
                                             Class 'A'    Class 'X'
                                            Form Entry   Form Entry
Job Record   ==============================____________|____________

CA JARS grouping takes one record at a time from the account file through grouping logic. Only if a record passes one group test can it then proceed to the next test.

The first step record is read from the account file and looks like the sample below. Position 28, processor ID, contains an S or a T. Positions 296 and 297, group codes 1 and 2 respectively, are blank. Position 443, SYSOUT class, should also be blank.

               Pos.        Pos.      Pos.
                28        296/297    443
Step1 Record ====S==========  ======== ====
                or
                 T

When this record has gone through the grouping, it looks like the sample below. The only changes are to position 296, group code 1, which is now an A.

               Pos.        Pos.      Pos.
                28        296/297    443
Step1 Record ====S==========A ======== ====

This record is selected for the report, as are the other two step records, because they all contain the same information in the fields tested as the step 1 record. The job record is next to be read from the account file. It is processed in a similar way to the step records, with one variation. If the job record passes through all the grouping tests, as the job record in our example did, then it is used to dynamically generate forms records from the data contained in the forms entries.

Job record before grouping: This is the job record before grouping. Position 28, the processing ID, contains S or T. Positions 296 and 297, group codes 1 and 2, are blank. The SYSOUT class field, position 443, is blank. The actual SYSOUT classes for this job are carried in the two forms entries.

               Pos.        Pos.      Pos.    Class 'A'    Class 'X'
                28        296/297    443    Form Entry   Form Entry
Job   Record ====S==========  ======== ====____________|____________
                or
                 T

Job record after grouping: This is the job record after grouping. The result is the same as with the step records; group code 1 is changed to an A. Note that the data in the forms entries has not yet been examined.

               Pos.        Pos.      Pos.    Class 'A'    Class 'X'
                28        296/297    443    Form Entry   Form Entry
Job   Record ====S==========A ======== ====____________|____________

It is at this point that CA JARS recognizes that forms records are to be created from the two forms entries at the end of this job record. One record is generated, and then that record is processed by the grouping logic. During this processing, the job record is kept by CA JARS so that it can be used to create the second forms record.

First forms record before grouping:

This is the first forms record before grouping. A record has been built from the data in the forms entry. Position 28, processing ID, contains a U. This indicates that this is a unit record, or a forms record. As with the job and step records, group codes 1 and 2 are blank. However, note that position 443, SYSOUT class, has been filled with data from the forms entry.

               Pos.        Pos.      Pos.
Forms Record    28        296/297    443
Class A      ====U==========B ========A====

This record contains line counts for SYSOUT class A, a class not included in the sample report. Therefore, the record should be rejected.

First forms record after grouping:

This is the first forms record after grouping, at which time it was rejected. Group code 1 is a B, because the processing ID is a U, and group code 2 is still a blank, because the SYSOUT class is not X.

               Pos.        Pos.      Pos.
Forms Record    28        296/297    443
Class A      ====U==========B ========A====

CA JARS goes back to the job record and uses it to generate the second forms record, the one for SYSOUT class X. This record is a full-sized record with the SYSOUT information in the base portion.

Second forms record before grouping:

This is the second forms record before grouping. Again the processing ID is U and group codes 1 and 2 are blank. The SYSOUT class of X is taken from the second forms entry.

               Pos.        Pos.      Pos.
Forms Record    28        296/297    443
Class X      ====U==========  ========X====

This record contains line counts for SYSOUT class X, the class to be included in the sample report. Therefore, the record should be selected.

Second forms record after grouping:

This is the second forms record after grouping, at which time it was selected. Group code 1 is set to B because processing ID is U, and group code 2 is also set to B because the SYSOUT class is equal to X.

               Pos.        Pos.      Pos.
Forms Record    28        296/297    443
Class X      ====U==========BB========X====

Now that all the forms entries have been turned into forms records, the job record is passed to the report. At this point, all grouping is complete for this job.

Records Read from Account File

Records Read by Grouping

Records Selected for the Report

Step1 Record

Step1 Record

Step1 Record

Step2 Record

Step2 Record

Step2 Record

Step3 Record

Step3 Record

Step3 Record

Job Record

Forms Record 1

Forms Record 2

Forms Record 2

Job Record

Job Record