Previous Topic: 3.1.6.2 Extended Options MenuNext Topic: 3.1.6.2.2 Specify Job Input Exit


3.1.6.2.1 Specify Global Data Selection Exit

If you enter Y (Yes) in the Specify global data selection
field on the Extended Options Menu, the SAS Statements panel
for specifying global data selection, shown Figure 3-13, is
displayed.


/-------------------------------  SAS Statements  ------------------------------\
|Command ===>                                                  Scroll ===> PAGE |
|                                                                               |
|Inquiry Step:  BAT - Batch Initiator Simulation                                |
|                                                                               |
|Line Cmds: I Insert  D Delete  R Repeat  M Move  C Copy                        |
|                                                                               |
|Cmd  SAS Statements for:  Specifying global data selection                     |
| -   ------------------------------------------------------------------------  |
| _ - %MACRO SELECT;                                                            |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _   ________________________________________________________________________  |
| _ - %MEND SELECT;                                                             |
|****************************** BOTTOM OF DATA  ********************************|
|                                                                               |
\---------------------------------------------------------------------------------/


 Figure 3-13.  Specify Global Data Selection Exit Panel

The global data selection exit allows you to code the SELECT
MACRO, which performs any type of selection that cannot be
done with the options on the Batch Initiator Simulation
inquiry panel.  This MACRO is invoked before the simulation
takes place (e.g., as data is being input).

For example, assume that a system in New York is processing
network job entry (NJE) jobs for performance classes below 30
that are submitted on a system in Chicago (system identifier
SYSB).  The reader timestamps (RDRTS) for the NJE jobs from
Chicago reflect the one-hour time zone difference between the
two systems, resulting in an inaccurate simulation if they
are not adjusted.  To adjust for the differences, code the
SELECT MACRO as shown in Figure 3-14.



/-------------------------------  SAS Statements  ------------------------------\
|Command ===>                                                  Scroll ===> PAGE |
|                                                                               |
|Inquiry Step:  BAT - Batch Initiator Simulation                                |
|                                                                               |
|Line Cmds: I Insert  D Delete  R Repeat  M Move  C Copy                        |
|                                                                               |
|Cmd  SAS Statements for:  Specifying global data selection                     |
| -   ------------------------------------------------------------------------  |
| _ - %MACRO SELECT;                                                            |
| _ -   IF PERFGRP<30;                                                          |
| _ -   IF JOBINCPU='SYSB' THEN DO;                                             |
| _ -      RDRTS=RDRTS+3600;                                                    |
| _ -      ENDTS=ENDTS+3600;                                                    |
| _ -      TDATE=DATEPART(ENDTS);                                               |
| _ -      MONTH=MONTH(TDATE);                                                  |
| _ -      DAY=DAY(TDATE);                                                      |
| _ -      HOUR=HOUR(ENDTS);                                                    |
| _ -      END:                                                                 |
| _ - %MEND SELECT;                                                             |
|****************************** BOTTOM OF DATA  ********************************|
|                                                                               |
|                                                                               |
\---------------------------------------------------------------------------------/


  Figure 3-14.  SAS Statements for Specifying Global Data Selection

This SELECT MACRO does several things.  First, it selects
only performance groups less than 30.  Next, for the NJE jobs
submitted on the system in Chicago (SYSB), it adjusts the
RDRTS values by one hour (3600 seconds) to correct for the
time zone difference.  Finally, it adjusts the value of ENDTS
by one hour to correct for the time zone difference, and then
recalculates the values of MONTH, DAY, and HOUR based on the
adjusted ENDTS.