• 触发器程序


    触发器程序:MPPF10
    MPPF10是要监控的表
    PENGLEI 是把数据取出来后放的表
    ADDPFTRG FILE(JJDTAL1/MPPF10) TRGTIME(*BEFORE) TRGEVENT(*INSERT) PGM(PAYPG
    MLIB/MPPF10)                                                                    

     *------------------------------------------------------
    FMPPF10    IF   E           K DISK                      
    F*                                    INFSR(@FERF00)    
    F*                                      参数表          
    FPENGLEI   UF A E           K DISK                      
    F                                                       
    F                                                       
     *------------------------------------------------------
    D Buffer          DS         32767      
    D  FileName               1     10      
    D  LibraryName           11     20      
    D  MemberName            21     30      
    D  TrgEvent              31     31      
    D  TrgTime               32     32      
    D  CommitLckLvl          33     33      
    D  Filler1               34     36      
    D  CCSID                 37     40B 0   
    D  Filler2               41     48      
    D  OldOff                49     52B 0   
    D  OldLen                53     56B 0   
    D  OldNullOffset         57     60B 0   
    D  OldNullLength         61     64B 0   
    D  NewOff                65     68B 0    
    D  NewLen                69     72B 0    
    D  NewNullOffset         73     76B 0    
    D  Resv3                 81     96       
    D  other                          *      
    DExtDs          E Ds                  ExtName(MPPF10)              
    D Leng            DS                                               
    D  Len                    1      4B 0                              
    DT                S               T                                
    C                                                                  
     *---------------------------------------------------------------- 
    C     *entry        Plist                                               
    C     Buffer        Parm                    Buffer                      
    C     LENG          Parm                    LENG                        
    C*  判断                                                                
    C                   Eval      ExtDs = %subst(Buffer:Newoff+1:NewLen)    
    C*  得到新加的记录值                                                    
    C                                                                       
    C                   Eval      MP10PYAMTA=MP10PYAMT                      
    C                   Eval      MP10PRACCA=MP10PRACC                      
    C                   Eval      MP10PRNAMA=MP10PRNAM                      
    C                   Eval      MP10PEACCA=MP10PEACC                      
    C                   Eval      MP10PENAMA=MP10PENAM                      
     *                                                                      
    C                   WRITE     PL                                       
    C                                                                      
    C                   EXSR      @EXIT                                    
    C*------------------------------------------------------------------*  
     * @EXIT   退出程序                                                *  
    C*------------------------------------------------------------------*  
    C     @EXIT         BEGSR                                              
    C                   SETON                                        LR    
    C                   RETURN                                             
    C                   ENDSR                                              
    C

    PF:PENGLEI
    *************** Beginning of data **********************************
         A          R PL                                                
         A                                                              
    12P2 A            MP10PYAMTA    12P 2       COLHDG(' 付款金额 ')    
         A                                                              
    32A  A            MP10PRACCA    32A         COLHDG(' 付款人帐号 ')  
         A                                                              
    60O  A            MP10PRNAMA    62O         COLHDG(' 付款人名称 ')  
         A                                                              
    32A  A            MP10PEACCA    32A         COLHDG(' 收款人帐号 ')  
         A                                                              
    60O  A            MP10PENAMA    62O         COLHDG(' 收款人名称 ')  
         A                                                              
         A                                                              
         A          K MP10PRACCA                                        
         A          K MP10PEACCA                 


    PF:MPPF10
    *************** Beginning of data **********************************
         A          R MPR10                                               
         A                                                              
    12P2 A            MP10PYAMT    12P 2       COLHDG(' 付款金额 ')    
         A                                                              
    32A  A            MP10PRACC    32A         COLHDG(' 付款人帐号 ')  
         A                                                              
    60O  A            MP10PRNAM    62O         COLHDG(' 付款人名称 ')  
         A                                                              
    32A  A            MP10PEACC    32A         COLHDG(' 收款人帐号 ')  
         A                                                              
    60O  A            MP10PENAM    62O         COLHDG(' 收款人名称 ')  
         A                                                              
         A                                                              
         A           K MP10PRACC

  • 相关阅读:
    linux正则表达式
    linux监控值free命令详解
    loadrunner 中数组的定义
    管线工具sed和正则表达式
    web_link()参数化
    mysql执行插入时性能优化
    linux关闭防火墙
    linux系统中变量和环境变量
    mysql源码安装与基本优化配置
    Memory Consistency Erros
  • 原文地址:https://www.cnblogs.com/mshwu/p/1259150.html
Copyright © 2020-2023  润新知