Previous Topic

Next Topic

Book Contents

Book Index

Example

Assume a file includes a transaction code in columns 17 to 23 (7 characters in length), and a transaction amount in columns 30 to 38 (9 characters in length). These two fields comprise the record key.

The Control-M/Analyzer rule below illustrates how to define this key to the Control-M/Analyzer Reconciliation facility.

The first block, SETKEY, initializes the variables necessary for performing the Preparation stage through the SETKEY function and performs this function on the file.

Subsequent blocks perform the reconciliation.

Figure 364 Reconciliation Function SETKEY Example

         LIBRARY : CTB.PROD.RULES                               RULE : SETKEY 

 COMMAND ===>                                                   SCROLL===> CRSR

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

   OWNER   M43                      GROUP BANKING_DEPARTMENT                  

   UPDATED 08/08/00  -  15:32:32    BY M43                                    

   DESC    RECONCILIATION FACILITY SETS KEY FIELDS                            

   OPTIONS                                                                    

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

   EXECUTE SETKEY   UPON                                                   C  

   ON DATA                                                                    

   ALWAYS                                                                     

     DO SET      = RECFUNC='SETKEY'                                        C  

     DO SET      = LEN1=7                                                  C  

     DO SET      = LEN2=9                                                  C  

     DO SET      = OFFSET1=17                                              C  

     DO SET      = OFFSET2=30                                              C  

     DO SET      = ARGNUM=4                                                C  

     DO CALLUSER = CTBRECL  ARG RECFUNC,ARGNUM,OFFSET1,LEN1,OFFSET2,LEN2   C  

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

   EXECUTE RECONCIL UPON                                                   C  

   ON DATA                                                                    

   PLEASE FILL IN RULE DEFINITION.                                   15.32.29

Parent Topic

SETKEY