 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /*        ADVANCE FUNCTION PRINTING                                  */
 /*          Pagedef ASAP01                                           */
 /*            Use => Format the AFPSTATS report for printing.        *//
 /*            Designed to be used with Formdef ASAP01.               */
 /*            Defaults:                                              */
 /*            Form => Letter size 8.50" X 11.00"                     */
 /*            Printable area => 8.30" X 10.80"                       */
 /*            Direction => Across(print left to right top to bottom) */
 /*            Setunits => IN (Any measurement uses inches unless     */
 /*                            other units are specified)             */
 /*   Note - These defaults are superceeded by the pageformat command */
 /*                                                                   */
 /*                                                                   */
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /*********************************************************************/
 /*  Set the specifications for the logical page                      */
 /*********************************************************************/
PAGEDEF ASAP01                      /* Page def name                  */
        REPLACE YES;                /* Replaces any previous compiles */
                                    /* Margins set in pageformat      */
                                    /* Default width 8.3 IN           */
                                    /* Default height 10.8 IN         */
  /********************************************************************/
  /* Name some fonts:                                                 */
  /*   title_font   => Helvetica 16 point, bold italic.               */
  /*   default_font => Helvetica 10 point.                            */
  /*   section_font => Hlevetica 16 point.                            */
  /*   heading_font => Helvetica 12 point bold.                       */
  /*   keyword_font => Helvetica 10 point bold.                       */
  /********************************************************************/
  FONT title_font                   /* Font name                      */
       CS H500F0                    /* Character set:                 */
                                    /* Helvetica 16 point, bold italic*/
       CP V10500;                   /* Code page:                     */
                                    /*  International #5              */

  FONT default_font                 /* Font name                      */
       CS H20080                    /* Character set:                 */
                                    /*  Helvetica 10 point            */
       CP V10500;                   /* Code page:                     */
                                    /*  International #5              */

  FONT section_font                 /* Font name                      */
       CS H200B0                    /* Character set:                 */
                                    /*  Helvetica 16 point            */
       CP V10500;                   /* Code page:                     */
                                    /*  International #5              */

  FONT heading_font                 /* Font name                      */
       CS H40000                    /* Character set:                 */
                                    /*  Helvetica 12 point, bold      */
       CP V10500;                   /* Code page:                     */
                                    /*  International #5              */

  FONT keyword_font                 /* Font name                      */
       CS H40080                    /* Character set:                 */
                                    /*  Helvetica 10 point, bold      */
       CP V10500;                   /* Code page:                     */
                                    /*  International #5              */
 /*********************************************************************/
 /*                                                                   */
 /*   There are six pageformats in this pagedef.  Depending on the    */
 /*   title of a section in the data, a pageformat is selected using  */
 /*   conditional processing.  Each pageformat has a condition        */
 /*   statement and each condition statement, when true, will select  */
 /*   a specific pageformat. The pageformat establishes a maping of   */
 /*   the physical page to the logical page.                          */
 /*********************************************************************/

 /*********************************************************************/
 /* Pageformat => Print File Information                              */
 /*********************************************************************/

  PAGEFORMAT prtfile                /* Page format name               */
             BOTMARGIN .5           /* Bottom margin for page footer  */
             WIDTH   10.8           /* Reduce size by .2 IN to allow  */
             HEIGHT  8.3            /* for paper size variations      */
             DIRECTION UP;          /* Landscape => print from bottom */
                                    /* to top of paper                */
 /*********************************************************************/
 /*   The first 10 characters of a record contain the record ID.  The */
 /*   layout text, in this case 'TITLE', is compaired to the record   */
 /*   ID. If the text and ID match then that is the layout used to    */
 /*   format that record.                                             */
 /*********************************************************************/
                                    /* Format of the title record     */
    LAYOUT 'TITLE' GRPHEADER XSPACE .2 IN/* Set extra space for next  */
                                         /* baseline                  */
           NEWPAGE                  /* This layout gets a new page    */
           DELIMITER '.'            /* Data is delimited by a . this  */
                                    /* is required to name the field  */
           POSITION 4.19 IN .5 IN;  /* Position data will be placed   */
                                    /* on the logical page            */
      FIELD FLDNUM 1                /* Field name, used in            */
                                    /* conditional processing         */
            START 4                 /* Data starts 4 bytes from the   */
                                    /* end of the 10 byte record ID   */
            FONT title_font;        /* Use title_font for this field  */

      CONDITION cond1               /* Condition name                 */
                FLDNUM 1            /* Name of field to compair       */
                                    /* conditional text to            */
                START 4             /* Start compairing at begining   */
                                    /* of field                       */
        /* FLDNUM 1 is compaired to the text of each WHEN statment.   */
        /* If the text matches FLDNUM 1 that WHEN statement is true.  */
        /* / indicates to keep the current copy group.                */
        /* Specifying a PAGEFORMAT indicates that before processing   */
        /* a pageformat, select the pageformat named.                 */
        WHEN EQ 'Processing Detail'            / PAGEFORMAT procdet
        WHEN EQ 'Resource Summary by Name'          / PAGEFORMAT name
        WHEN EQ 'Resource Summary by Data Set'      / PAGEFORMAT dataset
        WHEN EQ 'Resource Summary by Resource Type' / PAGEFORMAT restype
        WHEN EQ 'Processing Summary'           / PAGEFORMAT procsum
        OTHERWISE                              / PAGEFORMAT prtfile;

    SETUNITS LINESP .20 IN;         /* The base line for each new     */
                                    /* line is .20 IN from the last   */
                                    /* base line.                     */

    LAYOUT 'HEADING' BODY           /* Formats records with a record  */
                                    /* ID of HEADING                  */
           POSITION .5 IN NEXT      /* Sets position on logical page  */
           FONT section_font;       /* Default font for layout fields */
                                    /* If a field in this layout      */
                                    /* does not specify a font then   */
                                    /* this font will be used         */
      /****************************************************************/
      /*  COLUMNS OF PRINT FILE INFO                                  */
      /****************************************************************/
      FIELD TEXT 'Print File Identifier' /* COLUMN HEADER             */
       POSITION 0 CURRENT;
      FIELD TEXT 'PSF Environment'       /* COLUMN HEADER             */
       POSITION 2.80 CURRENT;
      FIELD TEXT 'Printer Environment'   /* CLOUMN HEADER             */
       POSITION 6.5 CURRENT;
      /* Underline the three column headings                          */
      DRAWGRAPHIC LINE ACROSS 1.3        /* Draw a normal line        */
        POSITION 0 .025;                 /* Down .025 INCHES          */
      DRAWGRAPHIC LINE ACROSS 1.3
        POSITION 2.80 .025;
      DRAWGRAPHIC LINE ACROSS 1.46
        POSITION 6.50 .025;
      /****************************************************************/
      /*  Labels for the rows of each column                          */
      /****************************************************************/
      FIELD START 4 LENGTH 8        /* Job ID                         */
            POSITION 0 IN NEXT
            FONT keyword_font;
      FIELD START 72 LENGTH 20      /* PSF Level                      */
            POSITION 2.80 CURRENT
            FONT keyword_font;
      FIELD START 167 LENGTH 7      /* Type                           */
            POSITION 6.50 IN CURRENT
            FONT keyword_font;
      FIELD START 13 LENGTH 8       /* Jobname                        */
            POSITION 0 IN NEXT
            FONT keyword_font;
      FIELD START 112 LENGTH 7      /* Printer                        */
            POSITION 2.80 IN CURRENT
            FONT keyword_font;
      FIELD START 120 LENGTH 24     /* Printer Title                  */
            POSITION 6.50 IN CURRENT
            FONT keyword_font;
      FIELD START 22 LENGTH 8       /* Stepname                       */
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 145 LENGTH 8      /* System                         */
            POSITION 2.80 CURRENT
            FONT keyword_font;
      FIELD START 175 LENGTH 12     /* Intm Device                    */
            POSITION 6.50 IN CURRENT
            FONT keyword_font;
      FIELD START 31 LENGTH 18      /* Data Source                    */
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 154 LENGTH 12     /* CPU ID                         */
            POSITION 2.80 CURRENT
            FONT keyword_font;
      FIELD START 188 LENGTH 10     /* Attachment                     */
            POSITION 6.50 IN CURRENT
            FONT keyword_font;
      FIELD START 50 LENGTH 10      /* Print Date                     */
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 93 LENGTH 18      /* PSF Attachment                 */
            POSITION 2.80 IN CURRENT
            FONT keyword_font;
      FIELD START 199 LENGTH 64     /* Identifier                     */
            POSITION 6.50 CURRENT
            FONT keyword_font;
      FIELD START 61 LENGTH 10      /* Print Time                     */
            POSITION 0 NEXT
            FONT keyword_font;


    LAYOUT 'PRINTFILE' BODY         /* Record ID with printfile data  */
            POSITION .5 IN SAME     /* Same place as previous layout  */
            FONT default_font;      /* default_font is default for    */
                                    /* this layout                    */
      /****************************************************************/
      /*  Data for the rows                                           */
      /****************************************************************/
      FIELD START 4 LENGTH 9        /* Job ID                         */
            POSITION 1.25 NEXT;
      FIELD START 72 LENGTH 20      /* PSF Level                      */
            POSITION 4.30 CURRENT;
      FIELD START 167 LENGTH 7      /* Type                           */
            POSITION 7.75 CURRENT;
      FIELD START 13 LENGTH 8       /* Jobname                        */
            POSITION 1.25 NEXT;
      FIELD START 112 LENGTH 7      /* Printer                        */
            POSITION 4.30 CURRENT;
      FIELD START 120 LENGTH 24     /* Printer Title                  */
            POSITION 7.75 CURRENT;
      FIELD START 22 LENGTH 8       /* Stepname                       */
            POSITION 1.25 NEXT;
      FIELD START 145 LENGTH 8      /* System                         */
            POSITION 4.30 CURRENT;
      FIELD START 175 LENGTH 12     /* Intm Device                    */
            POSITION 7.75 CURRENT;
      FIELD START 31 LENGTH 18      /* Data Source                    */
            POSITION 1.25 NEXT;
      FIELD START 154 LENGTH 12     /* CPU ID                         */
            POSITION 4.30 CURRENT;
      FIELD START 188 LENGTH 10     /* Attachment                     */
            POSITION 7.75 CURRENT;
      FIELD START 50 LENGTH 10      /* Print Date                     */
            POSITION 1.25 NEXT;
      FIELD START 93 LENGTH 18      /* PSF Attachment                 */
            POSITION 4.30 CURRENT;
      FIELD START 199 LENGTH 64     /* Identifier                     */
            POSITION 7.75 CURRENT;
      FIELD START 61 LENGTH 10      /* Print Time                     */
            POSITION 1.25 NEXT;

    LAYOUT 'COMMENT' BODY           /* Record ID used in the soft     */
            POSITION .5 IN 5 IN     /* copy report, not used here     */
            PRINTDATA NO;

    LAYOUT 'PAGEFOOTER' PAGETRAILER /* Same idea as the title record  */
            DELIMITER '.'
            POSITION .5 ABSOLUTE 8.2 /* Position of footer            */
            FONT default_font;
      FIELD FLDNUM 1
            START 4
            POSITION CURRENT CURRENT;/* Start of layout               */
      /* Insert the page number in the lower right corner             */
      FIELD POSITION 9 CURRENT
            TEXT 'Page - ';
      FIELD POSITION 9.45 CURRENT
            PAGENUM;

 /*********************************************************************/
 /*****  Pageformat => Processing Detail                         ******/
 /*********************************************************************/

  PAGEFORMAT procdet                /* Pageformat name                */
             BOTMARGIN .5 IN        /* Set a margin for the footer    */
             WIDTH   10.8 IN        /* Set as landscape               */
             HEIGHT  8.3 IN
             DIRECTION UP;          /* Print from bottom to top       */
                                    /* Get the record with the title  */
    LAYOUT 'TITLE' GRPHEADER XSPACE .2 IN/* ID and use it in the cond */
            NEWPAGE                 /* Each new pageformat gets a     */
                                    /*  new page independant of where */
                                    /*  the last pageformat ended     */
            DELIMITER '.'
            POSITION 4.45 IN .5 IN; /* Center the title               */
      /* This conditional statment is the same as the privious        */
      /* page                                                         */
      FIELD FLDNUM 1
            START 4
            FONT title_font;

      CONDITION cond2
                FLDNUM 1
                START 4
        WHEN EQ 'Print File Information'       / PAGEFORMAT prtfile
        WHEN EQ 'Resource Summary by Name'          / PAGEFORMAT name
        WHEN EQ 'Resource Summary by Data Set'      / PAGEFORMAT dataset
        WHEN EQ 'Resource Summary by Resource Type' / PAGEFORMAT restype
        WHEN EQ 'Processing Summary'            / PAGEFORMAT procsum
        OTHERWISE                               / PAGEFORMAT procdet;

    SETUNITS LINESP .2 IN;          /* Set the next baseline to be    */
                                    /* .2 IN from the last one        */

    LAYOUT 'HEADING' BODY           /* There must be a layout for     */
            POSITION .5 IN SAME     /* each record ID but in this     */
            PRINTDATA NO;           /* case the record is not printed */
    /******************************************************************/
    /* Each resource is listed with specific details                  */
    /******************************************************************/
    LAYOUT 'RESOURCE' BODY GROUP XSPACE .3 IN
            POSITION .5 IN RELATIVE NEXT
            FONT default_font;
      FIELD START 4 LENGTH 9        /* Resource member name data      */
            POSITION 0 IN CURRENT
            FONT keyword_font;
                                    /* Text data pairs                */
      FIELD TEXT 'Resource type='   /* Text top line                  */
            POSITION 1.15 CURRENT
            FONT keyword_font;
      FIELD START 13 LENGTH 18      /* Resource Type                  */
            POSITION CURRENT CURRENT;

      FIELD TEXT 'Library type='    /* Text top line                  */
            POSITION 3.60 CURRENT
            FONT keyword_font;
      FIELD START 32 LENGTH 9       /* Library Type                   */
            POSITION CURRENT CURRENT;

      FIELD TEXT 'Relative page='   /* Text top line                  */
            POSITION 5.40 CURRENT
            FONT keyword_font;
      FIELD START 56 LENGTH 14      /* Relative Page                  */
            POSITION CURRENT CURRENT;

      FIELD TEXT 'Disposition='     /* Text top line, end             */
            POSITION 7.25 CURRENT
            FONT keyword_font;
      FIELD START 123 LENGTH 27     /* Disposition                    */
            POSITION CURRENT CURRENT;

      FIELD TEXT 'Size='            /* Text second line               */
            POSITION 1.15 NEXT
            FONT keyword_font;
      FIELD START 41 LENGTH 14      /* DS Size                        */
            POSITION CURRENT CURRENT;

      FIELD TEXT 'Volume='          /* Text second line               */
            POSITION 3.60 CURRENT
            FONT keyword_font;
      FIELD START 116 LENGTH 6      /* Volume                         */
            POSITION CURRENT CURRENT;

      FIELD TEXT 'DSN='             /* Text second line               */
            POSITION 5.40 CURRENT
            FONT keyword_font;
      FIELD START 71 LENGTH 44      /* Data set name                  */
            POSITION CURRENT CURRENT;

    /******************************************************************/
    /* Data for any events that have occured                          */
    /******************************************************************/
    LAYOUT 'EVENT' BODY XSPACE .2
            POSITION .5 NEXT
            FONT default_font;
      FIELD START 4 LENGTH 6
            POSITION 0 CURRENT
            FONT keyword_font;
      FIELD START 10 LENGTH 24
            POSITION CURRENT CURRENT;
      FIELD START 35 LENGTH 5
            POSITION 2.5 CURRENT
            FONT keyword_font;
      FIELD START 40 LENGTH 14
            POSITION CURRENT CURRENT;
      FIELD START 55 LENGTH 6
            POSITION 4.00 CURRENT
            FONT keyword_font;
      FIELD START 61 LENGTH 8
            POSITION CURRENT CURRENT;
      FIELD START 70 LENGTH 9
            POSITION 5.50 CURRENT
            FONT keyword_font;
      FIELD START 79 LENGTH 8
            POSITION CURRENT CURRENT;
      FIELD START 88 LENGTH 6
            POSITION 7.00 CURRENT
            FONT keyword_font;
      FIELD START 94 LENGTH 53
            POSITION CURRENT CURRENT;

    LAYOUT 'COMMENT' BODY
            POSITION .5 NEXT
            PRINTDATA NO;

    LAYOUT 'NOTE' BODY
            POSITION .5 IN ABSOLUTE 7.5
            FONT default_font;
      FIELD TEXT 'Note: '
            POSITION 0 CURRENT
            FONT keyword_font;
      FIELD START 4 LENGTH 155
            POSITION CURRENT CURRENT;

    LAYOUT 'PAGEFOOTER' PAGETRAILER
            DELIMITER '.'
            POSITION .5 IN ABSOLUTE 8.2
            FONT default_font;
      FIELD FLDNUM 1
            START 4
            POSITION CURRENT CURRENT;
      FIELD POSITION 9 IN CURRENT
            TEXT 'Page - ';
      FIELD POSITION 9.45 CURRENT
            PAGENUM;

 /*********************************************************************/
 /***** Pageformat => Resource Summery by Name                   ******/
 /*********************************************************************/

  PAGEFORMAT name
             BOTMARGIN .5 IN
             WIDTH   10.8 IN
             HEIGHT  8.3 IN
             DIRECTION UP;

    LAYOUT 'TITLE' BODY XSPACE .2
            NEWPAGE
            DELIMITER '.'
            POSITION 3.85 .5;
      FIELD FLDNUM 1
            START 4
            FONT title_font;

      CONDITION cond3
                FLDNUM 1
                START 4

        WHEN EQ 'Processing Detail'             / PAGEFORMAT procdet
        WHEN EQ 'Print File Information'        / PAGEFORMAT prtfile
        WHEN EQ 'Resource Summary by Data Set'      / PAGEFORMAT dataset
        WHEN EQ 'Resource Summary by Resource Type' / PAGEFORMAT restype
        WHEN EQ 'Processing Summary'            / PAGEFORMAT procsum
        OTHERWISE                               / PAGEFORMAT name;

    SETUNITS LINESP .15 IN;         /* The base line for each new     */
                                    /* line is .15 IN from the last   */
                                    /* base line.                     */

    LAYOUT 'HEADING' GRPHEADER XSPACE .15
            POSITION .1 IN NEXT
            FONT keyword_font;
      FIELD TEXT 'Reference'
            POSITION 4.14 CURRENT
            FONT heading_font;
      FIELD TEXT 'Disposition'
            POSITION 8.17 CURRENT
            FONT heading_font;
      DRAWGRAPHIC LINE ACROSS 3.54
            POSITION 2.73 IN .025;
      DRAWGRAPHIC LINE ACROSS 3.47
            POSITION 6.78 IN .025;
      /****************************************************************/
      /*  Column headings                                             */
      /****************************************************************/
      FIELD START 4 LENGTH 8        /* RES NAME                       */
            POSITION 0.00 NEXT;
      FIELD START 13 LENGTH 18      /* RESOURCE TYPE                  */
            POSITION 0.70 CURRENT;
      FIELD START 32 LENGTH 12      /* LIB TYPE                       */
            POSITION 1.70 CURRENT;
      FIELD START 45 LENGTH 14      /* TOTAL                          */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 60 LENGTH 14      /* MAPPED                         */
            POSITION 3.80 CURRENT
            ALIGN RIGHT;
      FIELD START 75 LENGTH 14      /* INCLUDED                       */
            POSITION 4.60 CURRENT
            ALIGN RIGHT;
      FIELD START 90 LENGTH 14      /* JCL                            */
            POSITION 5.40 CURRENT
            ALIGN RIGHT;
      FIELD START 105 LENGTH 14     /* OTHER                          */
            POSITION 6.20 CURRENT
            ALIGN RIGHT;
      FIELD START 120 LENGTH 14     /* SOFT                           */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;
      FIELD START 135 LENGTH 14     /* HARD                           */
            POSITION 7.80 CURRENT
            ALIGN RIGHT;
      FIELD START 150 LENGTH 14     /* ACTIVATIONS                    */
            POSITION 8.60 CURRENT
            ALIGN RIGHT;
      FIELD START 165 LENGTH 14     /* MEMORY                         */
            POSITION 9.40 CURRENT
            ALIGN RIGHT;
      FIELD START 180 LENGTH 14     /* EXISTS                         */
            POSITION 10.2 CURRENT
            ALIGN RIGHT;
      /* Underline the headings                                       */
      DRAWGRAPHIC LINE ACROSS .550  /* RES NAME                       */
            POSITION 0 IN CPOS + .015;
      DRAWGRAPHIC LINE ACROSS .820  /* RESOURCE TYPE                  */
            POSITION 0.70 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .47   /* LIB TYPE                       */
            POSITION 1.70 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .27   /* TOTAL                          */
            POSITION 2.73 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .420  /* MAPPED                         */
            POSITION 3.39 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .460  /* INCLUDED                       */
            POSITION 4.15 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .230  /* JCL                            */
            POSITION 5.19 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .300  /* OTHER                          */
            POSITION 5.91 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .240  /* SOFT                           */
            POSITION 6.78 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .535  /* HARD                           */
            POSITION 7.28 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .440  /* ACTIVATIONS                    */
            POSITION 8.17 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .440  /* MEMORY                         */
            POSITION 8.98 IN CPOS;
      DRAWGRAPHIC LINE ACROSS .330  /* EXISTS                         */
            POSITION 9.88 IN CPOS;

    LAYOUT 'SUMM-NAME' BODY GROUP
            POSITION .1 IN NEXT
            FONT default_font;
      /****************************************************************/
      /* Rows of data                                                 */
      /****************************************************************/
      FIELD START 4 LENGTH 8        /* RES NAME                       */
            POSITION 0.00 CURRENT;
      FIELD START 13 LENGTH 18      /* RESOURCE TYPE                  */
            POSITION 0.70 CURRENT;
      FIELD START 32 LENGTH 12      /* LIB TYPE                       */
            POSITION 1.70 CURRENT;
      FIELD START 45 LENGTH 14      /* REFERENCED                     */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 60 LENGTH 14      /* MAPPED                         */
            POSITION 3.80 CURRENT
            ALIGN RIGHT;
      FIELD START 75 LENGTH 14      /* INCLUDED                       */
            POSITION 4.60 CURRENT
            ALIGN RIGHT;
      FIELD START 90 LENGTH 14      /* JCL                            */
            POSITION 5.40 CURRENT
            ALIGN RIGHT;
      FIELD START 105 LENGTH 14     /* OTHER                          */
            POSITION 6.20 CURRENT
            ALIGN RIGHT;
      FIELD START 120 LENGTH 14     /* SOFT                           */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;
      FIELD START 135 LENGTH 14     /* HARD                           */
            POSITION 7.80 CURRENT
            ALIGN RIGHT;
      FIELD START 150 LENGTH 14     /* ACTIVATIONS                    */
            POSITION 8.60 CURRENT
            ALIGN RIGHT;
      FIELD START 165 LENGTH 14     /* MEMORY                         */
            POSITION 9.40 CURRENT
            ALIGN RIGHT;
      FIELD START 180 LENGTH 14     /* EXISTS                         */
            POSITION 10.2 CURRENT
            ALIGN RIGHT;

    LAYOUT 'NOTE' BODY GROUP
            POSITION .5 IN ABSOLUTE 7.6 IN
            FONT default_font;
      FIELD TEXT 'Note: '
            POSITION 0 CURRENT
            FONT keyword_font;
      FIELD START 4 LENGTH 155
            POSITION CURRENT CURRENT;

    LAYOUT 'COMMENT' BODY GROUP
            POSITION .5 IN NEXT
            PRINTDATA NO;

    LAYOUT 'PAGEFOOTER' PAGETRAILER
            DELIMITER '.'
            POSITION .5 IN ABSOLUTE 8.2;
      FIELD FLDNUM 1
            START 4
            POSITION CURRENT CURRENT
            FONT default_font;
      FIELD POSITION 9 IN CURRENT
            TEXT 'Page - '
            FONT default_font;
      FIELD POSITION 9.5 IN CURRENT
            PAGENUM
            FONT default_font;

 /*********************************************************************/
 /*****  Pageformat => Resource Summery by Data Set              ******/
 /*********************************************************************/

  PAGEFORMAT dataset
             BOTMARGIN .5 IN
             WIDTH   8.3 IN         /* Set the page to portrait       */
             HEIGHT  10.8 IN
             DIRECTION ACROSS;

    LAYOUT 'TITLE' GRPHEADER XSPACE .2 IN
            NEWPAGE
            DELIMITER '.'
            POSITION 2.5 IN .5 IN;
      FIELD FLDNUM 1
            START 4
            FONT title_font;

      CONDITION cond4
                FLDNUM 1
                START 4

        WHEN EQ 'Processing Detail'             / PAGEFORMAT procdet
        WHEN EQ 'Resource Summary by Name'          / PAGEFORMAT name
        WHEN EQ 'Print File Information'          / PAGEFORMAT prtfile
        WHEN EQ 'Resource Summary by Resource Type' / PAGEFORMAT restype
        WHEN EQ 'Processing Summary'            / PAGEFORMAT procsum
        OTHERWISE                               / PAGEFORMAT dataset;

    LAYOUT 'SECTION' BODY XSPACE .15
            DELIMITER '.'
            POSITION .2 NEXT;
      FIELD FLDNUM 1
            START 4
            POSITION 0 CURRENT
            FONT section_font;

    /******************************************************************/
    /* Data that acts as a heading for each data set                  */
    /******************************************************************/
    LAYOUT 'SUMM-DSN' BODY
            POSITION .7 IN NEXT
            FONT keyword_font;
      FIELD START 4 LENGTH 53       /* Data set name                  */
            POSITION 0 IN CURRENT;
      FIELD START 66 LENGTH 14      /* VOL=SER                        */
            POSITION 5.77 CURRENT;
      DRAWGRAPHIC LINE ACROSS 6.79  /* Undrline the whole line        */
            POSITION 0 IN .025;

    /******************************************************************/
    /* Resource names for each data set, (six across).                */
    /******************************************************************/
    LAYOUT 'SUMM-DSN-R' BODY        /* Resource names, 6 per row      */
            POSITION .7 IN NEXT
            FONT default_font;
      FIELD START 4 LENGTH 12       /* Resource name 1                */
            POSITION 0 IN CURRENT;
      FIELD START 16 LENGTH 12      /* Resource name 2                */
            POSITION 1.40 CURRENT;
      FIELD START 28 LENGTH 12      /* Resource name 3                */
            POSITION 2.60 CURRENT;
      FIELD START 40 LENGTH 12      /* Resource name 4                */
            POSITION 3.80 CURRENT;
      FIELD START 52 LENGTH 12      /* Resource name 5                */
            POSITION 5.00 CURRENT;
      FIELD START 64 LENGTH 12      /* Resource name 6                */
            POSITION 6.20 CURRENT;

    LAYOUT 'NOTE' BODY
            POSITION .2 ABSOLUTE 10.1
            FONT default_font;
      FIELD TEXT 'Note: '
            POSITION 0 CURRENT
            FONT keyword_font;
      FIELD START 4 LENGTH 155
            POSITION .4 CURRENT;
   /* FIELD START 88 LENGTH 70    */
   /*       POSITION .5 NEXT;     */

    LAYOUT 'COMMENT' BODY
      POSITION .5 IN NEXT
      PRINTDATA NO;

    LAYOUT 'PAGEFOOTER' PAGETRAILER
            DELIMITER '.'
            POSITION .5 ABSOLUTE 10.6 IN;
      FIELD FLDNUM 1
            START 4
            POSITION CURRENT CURRENT
            FONT default_font;
      FIELD POSITION 6 IN CURRENT
            TEXT 'Page - '
            FONT default_font;
      FIELD POSITION 6.5 IN CURRENT
            PAGENUM
            FONT default_font;

 /*********************************************************************/
 /*****  Pageformat => Resource Summery by Type                  ******/
 /*********************************************************************/

  PAGEFORMAT restype
             BOTMARGIN .5 IN
             WIDTH   8.3 IN
             HEIGHT  10.8 IN
             DIRECTION ACROSS;

    LAYOUT 'TITLE' GRPHEADER XSPACE .2 IN
           NEWPAGE
           DELIMITER '.'
           POSITION 2.25 IN .5 IN;
      FIELD FLDNUM 1
            START 4
            FONT title_font;

      CONDITION cond5
                FLDNUM 1
                START 4

        WHEN EQ 'Processing Detail'             / PAGEFORMAT procdet
        WHEN EQ 'Resource Summary by Name'          / PAGEFORMAT name
        WHEN EQ 'Resource Summary by Data Set'      / PAGEFORMAT dataset
        WHEN EQ 'Print File Information'          / PAGEFORMAT prtfile
        WHEN EQ 'Processing Summary'            / PAGEFORMAT procsum
        OTHERWISE                               / PAGEFORMAT restype;

    SETUNITS LINESP .20 IN;

    LAYOUT 'SECTION' BODY XSPACE .15 IN
            DELIMITER '.'
            POSITION .20 NEXT;
      FIELD FLDNUM 1
            START 4
            POSITION 0 CURRENT
            FONT section_font;

    /******************************************************************/
    /*  Headings for the Reference Summary section                    */
    /******************************************************************/
    LAYOUT 'HEADING-RF' BODY
            POSITION .20 NEXT
            FONT keyword_font;
      FIELD START 4 LENGTH 18       /* RESOURCE TYPE                  */
            POSITION 0 CURRENT;
      FIELD START 23 LENGTH 14      /* UNIQUE                         */
            POSITION 2.00 CURRENT
            ALIGN RIGHT;
      FIELD START 38 LENGTH 14      /* JCL                            */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 53 LENGTH 14      /* MAPPED                         */
            POSITION 4.00 CURRENT
            ALIGN RIGHT;
      FIELD START 68 LENGTH 14      /* INCLUDE                        */
            POSITION 5.00 CURRENT
            ALIGN RIGHT;
      FIELD START 83 LENGTH 14      /* OTHER                          */
            POSITION 6.00 CURRENT
            ALIGN RIGHT;
      FIELD START 98 LENGTH 14      /* REFERENCE                      */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;
      DRAWGRAPHIC LINE ACROSS .800  /* RESOURCE TYPE                  */
            POSITION 0.00 .025;
      DRAWGRAPHIC LINE ACROSS .370  /* UNIQUE                         */
            POSITION 1.63 .025;
      DRAWGRAPHIC LINE ACROSS .220  /* JCL                            */
            POSITION 2.78 .025;
      DRAWGRAPHIC LINE ACROSS .420  /* MAPPED                         */
            POSITION 3.58 .025;
      DRAWGRAPHIC LINE ACROSS .450  /* INCLUDED                       */
            POSITION 4.55 .025;
      DRAWGRAPHIC LINE ACROSS .300  /* OTHER                          */
            POSITION 5.70 .025;
      DRAWGRAPHIC LINE ACROSS .260  /* TOTAL                          */
            POSITION 6.73 .025;

    /******************************************************************/
    /* Headings for the Location Summary section                      */
    /******************************************************************/
    LAYOUT 'HEADING-LC' BODY
            POSITION .20 NEXT
            FONT keyword_font;
      FIELD START 4 LENGTH 18       /* RESOURCE TYPE                  */
            POSITION 0 CURRENT;
      FIELD START 23 LENGTH 14      /* UNIQUE                         */
            POSITION 2.00 CURRENT
            ALIGN RIGHT;
      FIELD START 38 LENGTH 14      /* INLINE                         */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 53 LENGTH 14      /* USER                           */
            POSITION 4.00 CURRENT
            ALIGN RIGHT;
      FIELD START 68 LENGTH 14      /* SECURITY                       */
            POSITION 5.00 CURRENT
            ALIGN RIGHT;
      FIELD START 83 LENGTH 14      /* SYSTEM                         */
            POSITION 6.00 CURRENT
            ALIGN RIGHT;
      FIELD START 98 LENGTH 14      /* PSF DEF                        */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;
      FIELD START 113 LENGTH 14     /* RESIDENT                       */
            POSITION 8.00 CURRENT
            ALIGN RIGHT;
      DRAWGRAPHIC LINE ACROSS .800  /* RESOURCE TYPE                  */
            POSITION 0.00 .025;
      DRAWGRAPHIC LINE ACROSS .370  /* UNIQUE                         */
            POSITION 1.63 .025;
      DRAWGRAPHIC LINE ACROSS .300  /* INLINE                         */
            POSITION 2.70 .025;
      DRAWGRAPHIC LINE ACROSS .260  /* USER                           */
            POSITION 3.75 .025;
      DRAWGRAPHIC LINE ACROSS .450  /* SECURITY                       */
            POSITION 4.55 .025;
      DRAWGRAPHIC LINE ACROSS .400  /* SYSTEM                         */
            POSITION 5.60 .025;
      DRAWGRAPHIC LINE ACROSS .600  /* PSF DEFAULT                    */
            POSITION 6.40 .025;
      DRAWGRAPHIC LINE ACROSS .450  /* RESIDENT                       */
            POSITION 7.55 .025;

    /******************************************************************/
    /* Headings for the Disposition Summary section                   */
    /******************************************************************/
    LAYOUT 'HEADING-DP' BODY
            POSITION .20 NEXT
            FONT keyword_font;
      FIELD START 4 LENGTH 18       /* RESOURCE TYPE                  */
            POSITION 0 CURRENT;
      FIELD START 23 LENGTH 14      /* UNIQUE                         */
            POSITION 2.00 CURRENT
            ALIGN RIGHT;
      FIELD START 38 LENGTH 14      /* SOFT                           */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 53 LENGTH 14      /* DOWNLOAD                       */
            POSITION 4.00 CURRENT
            ALIGN RIGHT;
      FIELD START 68 LENGTH 14      /* ACTIVATE                       */
            POSITION 5.00 CURRENT
            ALIGN RIGHT;
      FIELD START 83 LENGTH 14      /* MEMORY                         */
            POSITION 6.00 CURRENT
            ALIGN RIGHT;
      FIELD START 98 LENGTH 14      /* EXIST                          */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;
      DRAWGRAPHIC LINE ACROSS .800  /* RESOURCE TYPE                  */
            POSITION 0.00 .025;
      DRAWGRAPHIC LINE ACROSS .370  /* UNIQUE                         */
            POSITION 1.63 .025;
      DRAWGRAPHIC LINE ACROSS .220  /* SOFT                           */
            POSITION 2.78 .025;
      DRAWGRAPHIC LINE ACROSS .530  /* DOWNLOAD                       */
            POSITION 3.47 .025;
      DRAWGRAPHIC LINE ACROSS .450  /* ACTIVATE                       */
            POSITION 4.55 .025;
      DRAWGRAPHIC LINE ACROSS .420  /* MEMORY                         */
            POSITION 5.58 .025;
      DRAWGRAPHIC LINE ACROSS .330  /* EXISTS                         */
            POSITION 6.67 .025;

    /******************************************************************/
    /*  Data for the Reference Summary section                        */
    /******************************************************************/
    LAYOUT 'SUMM-REF'
            POSITION .20 NEXT
            FONT default_font;
      FIELD START 4 LENGTH 18       /* RESOURCE TYPE                  */
            POSITION 0 CURRENT;
      FIELD START 23 LENGTH 14      /* UNIQUE                         */
            POSITION 2.00 CURRENT
            ALIGN RIGHT;
      FIELD START 38 LENGTH 14      /* JCL                            */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 53 LENGTH 14      /* MAPPED                         */
            POSITION 4.00 CURRENT
            ALIGN RIGHT;
      FIELD START 68 LENGTH 14      /* INCLUDE                        */
            POSITION 5.00 CURRENT
            ALIGN RIGHT;
      FIELD START 83 LENGTH 14      /* OTHER                          */
            POSITION 6.00 CURRENT
            ALIGN RIGHT;
      FIELD START 98 LENGTH 14      /* REFERENCE                      */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;

    /******************************************************************/
    /* Data for the Location Summary section                          */
    /******************************************************************/
    LAYOUT 'SUMM-LOC' BODY
            POSITION .20 NEXT
            FONT default_font;
      FIELD START 4 LENGTH 19       /* RESOURCE TYPE                  */
            POSITION 0 CURRENT;
      FIELD START 23 LENGTH 14      /* UNIQUE                         */
            POSITION 2.00 CURRENT
            ALIGN RIGHT;
      FIELD START 38 LENGTH 14      /* JCL OR INLINE OR SOFT          */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 53 LENGTH 14      /* MAPPED OR USER OR DOWNLD       */
            POSITION 4.00 CURRENT
            ALIGN RIGHT;
      FIELD START 68 LENGTH 14      /* INCLUDE OR SECURITY OR ACTIVAT */
            POSITION 5.00 CURRENT
            ALIGN RIGHT;
      FIELD START 83 LENGTH 14      /* REFERENCE OR SYSTEM OR MEMORY  */
            POSITION 6.00 CURRENT
            ALIGN RIGHT;
      FIELD START 98 LENGTH 14      /* PSF DEF                        */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;
      FIELD START 113 LENGTH 14     /* RESIDENT                       */
            POSITION 8.00 CURRENT
            ALIGN RIGHT;

    /******************************************************************/
    /* Data for the Disposition Summary section                       */
    /******************************************************************/
    LAYOUT 'SUMM-DISP' BODY
            POSITION .2 NEXT
            FONT default_font;
      FIELD START 4 LENGTH 18       /* RESOURCE TYPE                  */
            POSITION 0 CURRENT;
      FIELD START 23 LENGTH 14      /* UNIQUE                         */
            POSITION 2.00 CURRENT
            ALIGN RIGHT;
      FIELD START 38 LENGTH 14      /* SOFT                           */
            POSITION 3.00 CURRENT
            ALIGN RIGHT;
      FIELD START 53 LENGTH 14      /* DOWNLD                         */
            POSITION 4.00 CURRENT
            ALIGN RIGHT;
      FIELD START 68 LENGTH 14      /* ACTIVATE                       */
            POSITION 5.00 CURRENT
            ALIGN RIGHT;
      FIELD START 83 LENGTH 14      /* MEMORY                         */
            POSITION 6.00 CURRENT
            ALIGN RIGHT;
      FIELD START 98 LENGTH 14      /* EXIST                          */
            POSITION 7.00 CURRENT
            ALIGN RIGHT;

    LAYOUT 'NOTE' BODY
            POSITION .2 IN ABSOLUTE 10.1
            FONT default_font;
      FIELD TEXT 'Note: '
            POSITION 0 CURRENT
            FONT keyword_font;
      FIELD START 4 LENGTH 154
            POSITION .4 CURRENT;
   /* FIELD START 88 LENGTH 70  */
   /*       POSITION .5 NEXT;   */

    LAYOUT 'COMMENT' BODY
      POSITION .5 IN NEXT
      PRINTDATA NO;

    LAYOUT 'PAGEFOOTER' PAGETRAILER
            DELIMITER '.'
            POSITION 1 IN ABSOLUTE 10.6 IN;
      FIELD FLDNUM 1
            START 4
            POSITION CURRENT CURRENT
            FONT default_font;
      FIELD POSITION 6 IN CURRENT
            TEXT 'Page - '
            FONT default_font;
      FIELD POSITION 6.5 IN CURRENT
            PAGENUM
            FONT default_font;

 /*********************************************************************/
 /*****  Pageformat => Pocessing Summery                         ******/
 /*********************************************************************/

  PAGEFORMAT procsum
             BOTMARGIN .5 IN
             WIDTH   8.3 IN
             HEIGHT  10.8 IN
             DIRECTION ACROSS;

    LAYOUT 'TITLE' GRPHEADER XSPACE .2
            NEWPAGE
            DELIMITER '.'
            POSITION 3.1 .5;
      FIELD FLDNUM 1
            START 4
            FONT title_font;

      CONDITION cond6
                FLDNUM 1
                START 4
        WHEN EQ 'Processing Detail'              / PAGEFORMAT procdet
        WHEN EQ 'Resource Summary by Name'          / PAGEFORMAT name
        WHEN EQ 'Resource Summary by Data Set'      / PAGEFORMAT dataset
        WHEN EQ 'Resource Summary by Resource Type' / PAGEFORMAT restype
        WHEN EQ 'Print File Information'         / PAGEFORMAT prtfile
        OTHERWISE                              / PAGEFORMAT procsum;

    LAYOUT 'SECTION' BODY XSPACE .2 IN
            DELIMITER '.'
            POSITION .5 IN NEXT;
      FIELD FLDNUM 1
            START 4
            POSITION 0 CURRENT
            FONT section_font;
    /******************************************************************/
    /*  Headings for the Significant Events section                   */
    /******************************************************************/
    LAYOUT 'HEADING-EL' BODY XSPACE .15
            POSITION 1.5 IN NEXT
            FONT heading_font;
      FIELD START 4 LENGTH 14
            POSITION 1.0 CURRENT
            ALIGN RIGHT;
      FIELD START 19 LENGTH 24
            POSITION 1.5 CURRENT;
      FIELD START 44 LENGTH 53
            POSITION 3.5 CURRENT;

    /******************************************************************/
    /*  Headings for the Summary of Pages section                     */
    /******************************************************************/
    LAYOUT 'HEADING-SP' BODY
            POSITION 0 SAME
            PRINTDATA NO;

    /******************************************************************/
    /*  Data for the Summary of Pages section                         */
    /******************************************************************/
    LAYOUT 'SUMM-PAGE' BODY XSPACE 1.2
            POSITION 1.00 IN NEXT
            FONT default_font;
                                    /* Fields are in text, data pairs */
      FIELD TEXT 'Total pages'
            POSITION 0 CURRENT
            FONT keyword_font;
      FIELD START 4 LENGTH 14
            POSITION 2.30 CURRENT
            ALIGN RIGHT;

      FIELD TEXT 'Records'
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 22 LENGTH 14
            POSITION 2.30 CURRENT
            ALIGN RIGHT;

      FIELD TEXT 'File size'
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 40 LENGTH 14
            POSITION 2.30 CURRENT
            ALIGN RIGHT;

      FIELD TEXT 'Average page size'
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 58 LENGTH 14
            POSITION 2.30 CURRENT
            ALIGN RIGHT;

      FIELD TEXT 'Smallest page size'
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 76 LENGTH 14
            POSITION 2.30 CURRENT
            ALIGN RIGHT;

      FIELD TEXT 'Page number'
            POSITION 2.60 CURRENT
            FONT keyword_font;
      FIELD START 112 LENGTH 14
            POSITION 4.30 CURRENT
            ALIGN RIGHT;

      FIELD TEXT 'Largest page size'
            POSITION 0 NEXT
            FONT keyword_font;
      FIELD START 94 LENGTH 14
            POSITION 2.30 CURRENT
            ALIGN RIGHT;

      FIELD TEXT 'Page number'
            POSITION 2.6 CURRENT
            FONT keyword_font;
      FIELD START 130 LENGTH 14
            POSITION 4.30 CURRENT
            ALIGN RIGHT;

    /******************************************************************/
    /*  Data for the Significant Events section                       */
    /******************************************************************/
    LAYOUT 'EVENT-LIST' BODY XSPACE .2 IN
            POSITION 1.50 IN NEXT
            FONT default_font;
      FIELD START 4 LENGTH 14       /* Page number                    */
            POSITION 1.0 CURRENT
            ALIGN RIGHT;
      FIELD START 19 LENGTH 24      /* Event type                     */
            POSITION 1.5 CURRENT;
      FIELD START 44 LENGTH 53      /* Supporting data                */
            POSITION 3.5 CURRENT;

    LAYOUT 'NOTE' BODY XSPACE .2
            POSITION .5 IN NEXT
            FONT default_font;
      FIELD TEXT 'Note: '
            POSITION 0 CURRENT
            FONT keyword_font;
      FIELD START 4 LENGTH 155
            POSITION .4 CURRENT;
    /*FIELD START 130 LENGTH 25    */
    /*      POSITION .5 NEXT;      */

    LAYOUT 'COMMENT' BODY
            POSITION .5 IN NEXT
            PRINTDATA NO;

    LAYOUT 'PAGEFOOTER' PAGETRAILER
            DELIMITER '.'
            POSITION 1 IN ABSOLUTE 10.6 IN;
      FIELD FLDNUM 1
            START 4
            POSITION CURRENT CURRENT
            FONT default_font;
      FIELD POSITION 6 IN CURRENT
            TEXT 'Page - '
            FONT default_font;
      FIELD POSITION 6.5 IN CURRENT
            PAGENUM
            FONT default_font;

