Previous Topic

Next Topic

Book Contents

Book Index

AutoEdit Substitution of Database Variables

AutoEdit Substitution (by the %% operator) is especially useful for printing Database variables using statement DO PRINT. When specifying AutoEdit substitution for Database variables, specify %% before the entire name and, if it exists, replace the period separator (that separates the Group name prefix and the variable name) with a colon separator.

For example, a Database variable with the Variable Reference Statement

DB_ACCOUNTING.TOTALEXP@G1

can be resolved using AutoEdit substitution by changing its Variable Reference Statement to

%%DB_ACCOUNTING:TOTALEXP@G1

Example

Figure 108 AutoEdit Substitution of Database Variables

             LIBRARY : CTB.PROD.RULES                                RULE : DBVARAE

 COMMAND ===>                                                    SCROLL===> CRSR

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

   OWNER    M43                    GROUP PERSONNEL                             

   UPDATED  04/04/00 - 10:20:09    BY M43                                     

   DESC                                                                       

   OPTIONS                                                                    

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

   EXECUTE GETAVG   UPON                                                   C  

   ON FILE       FILENAME A00.EMPS                                             

      MODE DS    LINECT 0000    DATASTAMP                                     

   WHEN LINE 001     - 999     COL 001     - 001              STOP     AND/OR 

        STRING = .AL.                                                         

     DO EXTRACT  = DB_PERSONNEL.EMPNAME                                       

                   LEVEL   LINE +000 COL 0001 - 0020 PROCESS           TYP    

     DO EXTRACT  = DB_PERSONNEL.EMPSALARY                                     

                   LEVEL   LINE +000 COL 0021 - 0032 PROCESS           TYP    

     DO PRINT  = %%DB_PERSONNEL:EMPNAME      %%DB_PERSONNEL:EMPSALARY  F   C  

     DO                                                                       

   WHEN LINE          -         COL        -                  STOP     AND/OR  

        STRING =                                                              

     DO

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

   EXECUTE           UPON                                                  C   

 PLEASE FILL IN RULE DEFINITION                                         11.42.28

For additional information on AutoEdit substitution, see Rules of AutoEdit Variable Substitution.

Parent Topic

Variable Generation Attributes