Previous Topic

Next Topic

Book Contents

Book Index

Example

Statement ALWAYS is commonly used for initialization and preparatory actions that should be performed before processing begins. In this example, statement ALWAYS:

Prepares header lines for the report that the rule definition produces.

Figure 177 ALWAYS Statement Example

         LIBRARY : CTB.PROD.RULES                                RULE : RULEMP

 COMMAND ===>                                                    SCROLL===> CRSR

 +-----------------------------------------------------------------------------+

   OWNER   M18B                     GROUP ADMIN                                

   UPDATED 04/04/00  -  15:30:05    BY M18B                                    

   DESC    CHECK EMPLOYEES REPORT FOR BALANCING                                

   OPTIONS                                                                     

   =========================================================================== 

   EXECUTE PREPARE  UPON                                                   C   

   ON DATA                                                                     

   LABEL: INIT                                                                 

   ALWAYS                                                                      

     DO SET      = CNTR=0                                                  C   

     DO SET      = ERR=0                                                   C   

     DO PRINT    =  UNREASONABLE SICK/VACATION DAYS                    F   C   

     DO PRINT    = =================================                   F   C   

     DO PRINT    = +--+---------------+------+-----+                   F   C   

     DO PRINT    = |  | NAME          | SICK | VAC |                   F   C   

     DO PRINT    = +--+---------------+------+-----+                   F   C   

     DO                                                                        

                (ENTER "ALWAYS", "IF")                                         

   =========================================================================== 

   EXECUTE INPUT    UPON                                                   C   

 PLEASE FILL IN RULE DEFINITION.                                        18.31.58

Parent Topic

ALWAYS: Data Identification Statement