

3. PERFORMANCE ANALYSIS TOOLS › 3.1 Batch Initiator Simulation › 3.1.6 Component Operation › 3.1.6.2 Extended Options Menu › 3.1.6.2.4 Specify Clock Update Exit
3.1.6.2.4 Specify Clock Update Exit
If you enter Y (Yes) in the Specify clock update exit field
on the Extended Options Menu, the SAS Statements panel for
specifying a clock update exit, shown in Figure 3-19, 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 Clock Update exit |
| - ------------------------------------------------------------------------ |
| _ - %MACRO PERINT; |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ ________________________________________________________________________ |
| _ - %MEND PERINT; |
|****************************** BOTTOM OF DATA ********************************|
| |
\---------------------------------------------------------------------------------/
Figure 3-19. Specify Clock Update Exit Panel
The simulation clock update exit (PERINT) is invoked each
time the simulation clock is updated. You can use it to set
user variables you want available during each interval of the
simulation, examine the queues in detail at certain points
during the simulation, dynamically change the queues, or
change the initiator structure.
For example, to set the minimum priority for a job based on
the current value of the simulation clock, code the PERINT
MACRO as shown in Figure 3-20.
/------------------------------ 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 Clock Update exit |
| - ------------------------------------------------------------------------ |
| - %MACRO PERINT; |
| _ - RETAIN MINPRTY; |
| _ - IF HOUR(INOW)=>0 AND HOUR(INOW)=<6 THEN MINPRTY=0; |
| _ - IF HOUR(INOW)=>7 AND HOUR(INOW)=<8 THEN MINPRTY=7; |
| _ - IF HOUR(INOW)=>9 AND HOUR(INOW)=<11 THEN MINPRTY=11; |
| _ - IF HOUR(INOW)=>12 AND HOUR(INOW)=<13 THEN MINPRTY=9; |
| _ - IF HOUR(INOW)=>14 AND HOUR(INOW)=<16 THEN MINPRTY=11; |
| _ - IF HOUR(INOW)=>17 AND HOUR(INOW)=<18 THEN MINPRTY=9; |
| _ - IF HOUR(INOW)=>19 AND HOUR(INOW)=<20 THEN MINPRTY=7; |
| _ - IF HOUR(INOW)=>21 AND HOUR(INOW)=<23 THEN MINPRTY=11; |
| _ - %MEND PERINT; |
|****************************** BOTTOM OF DATA *******************************|
| |
\---------------------------------------------------------------------------------/
Figure 3-20. SAS Statements for Specifying a Clock Update Exit
The PERINT MACRO uses INOW, the variable containing the
current value of the simulation clock, to set the minimum
priority allowed during the time being simulated.
Using this MACRO in conjunction with the job selection exit
PERJSX, documented in Section 3.1.6.2.3, allows you to
determine the effects of preventing certain job classes from
executing during certain time periods.
Using the output of the PERINT MACRO above, you can code the
PERJSX MACRO as shown in Figure 3-21 and obtain the effect of
preventing prime time execution of jobs whose priorities are
less than 7.
/------------------------------- SAS Statements -----------------------------\
|Command ===> Scroll ===> PAGE |
|Warning: Set SELECT=0; to skip an observation |
|Inquiry Step: BAT - Batch Initiator Simulation |
| |
|Line Cmds: I Insert D Delete R Repeat M Move C Copy |
| |
|Cmd SAS Statements for: Specifying Job Selection exit |
| - ----------------------------------------------------------- |
| _ - %MACRO PERJSX; |
| _ - IF J_PTY(JP)>=MINPRTY THEN SELECT=1; |
| _ - ELSE SELECT=0; |
| ________________________________________________________________________ |
| ________________________________________________________________________ |
| ________________________________________________________________________ |
| ________________________________________________________________________ |
| ________________________________________________________________________ |
| ________________________________________________________________________ |
| ________________________________________________________________________ |
| ________________________________________________________________________ |
| _ - %MEND PERJSX; |
|****************************** BOTTOM OF DATA ********************************|
| |
| |
| |
\---------------------------------------------------------------------------------/
Figure 3-21. SAS Statements for Job Selection Exit
This exit is located at a point in the code where the clock
has been updated for the next simulation interval and
priority aging has been done if appropriate. The exit is
taken before any other actions are taken for the interval
(e.g., starting or ending jobs, or writing simulation
outputs).
NOTE: You should not code subsetting IFs in this clock
update exit MACRO to perform data selection. You
should code them in the global data selection exit
described in Section 3.1.6.2.1.
Copyright © 2014 CA.
All rights reserved.
 
|
|