David Turner's performance problem solved code

David Turner's performance problem solved code.

This Content Component encountered an error
   DDS   

*************** Beginning of data *************************************
0027.00      A                                      DSPSIZ(24 80 *DS3)
0028.00      A          R DUMMY                     ASSUME            
0029.00      A                                  1  2' '               
0030.00      A          R FOOT                                        
0031.00      A          R SFL                       SFL               
0032.00      A            JOBNAM        10A  O  8  2                  
0033.00      A            JOBUSR        10A  O  8 13
0034.00      A            JOBNBR         6A  O  8 24             
0035.00      A            JOBPTY         3A  O  8 31             
0036.00      A            JOBIOT         5Y 0O  8 35EDTCDE(3)    
0037.00      A            JOBSEC         5Y 2O  8 41EDTCDE(3)    
0038.00      A            JOBGPH        30A  O  8 50DSPATR(RI)   
0039.00      A  50N51                               DSPATR(HI)   
0040.00      A  51                                  DSPATR(BL)   
0041.00      A          R SFLCTL                    SFLCTL(SFL)  
0042.00      A                                      SFLSIZ(0014) 
0043.00      A                                      SFLPAG(0014) 
0044.00      A  90                                  SFLDSP       
0045.00      A  91                                  SFLDSPCTL    
0046.00      A  92                                  SFLCLR       
0047.00      A                                      FRCDTA       
0048.00      A                                      OVERLAY      
0049.00      A  52                                  ALARM        
0050.00      A                                  1 31'CPU MONITOR'
0051.00      A                                      DSPATR(HI)        
0052.00      A                                  1 71DATE              
0053.00      A                                      EDTCDE(Y)         
0054.00      A                                  2 71TIME              
0055.00      A                                      EDTCDE(3)         
0056.00      A                                  3  2'Elapsed time . :'
0057.00      A            ELPSEC         5Y 2O  3 21EDTCDE(3)         
0058.00      A                                  3 28'Seconds'         
0059.00      A                                  4  2'CPU utilization:'
0060.00      A            CPUSEC         5Y 2O  4 21EDTCDE(3)         
0061.00      A                                  4 28'Seconds'         
0062.00      A            CPUPCT         5Y 2O  4 39EDTCDE(3)         
0063.00      A                                  4 46'%'               
0064.00      A            CPUGPH        30A  O  4 50DSPATR(RI)        
0065.00      A  60                                  COLOR(BLU)        
0066.00      A  61                                  COLOR(YLW)        
0067.00      A  62                                  COLOR(RED)        
0068.00      A                                  6  2'Job or'                  
0069.00      A                                      DSPATR(HI)                
0070.00      A                                  6 35'Total'                   
0071.00      A                                      DSPATR(HI)                
0072.00      A                                  7  3'Task'                    
0073.00      A                                      DSPATR(HI)                
0074.00      A                                  7 13'User'                    
0075.00      A                                      DSPATR(HI)                
0076.00      A                                  7 24'Number'                  
0077.00      A                                      DSPATR(HI)                
0078.00      A                                  7 36'I/O'                     
0079.00      A                                      DSPATR(HI)                
0080.00      A                                  7 31'PTY'                     
0081.00      A                                      DSPATR(HI)                
0082.00      A                                  7 50'Share of CPU utilization'
0083.00      A                                      DSPATR(HI)                
0084.00      A                                  6 44'CPU'
0085.00      A                                      DSPATR(HI)                  
0086.00      A                                  7 43'Secs'                      
0087.00      A                                      DSPATR(HI)                  
0088.00      A          R CHCWDW                    WINDOW(9 2 11 32 *NOMSGLIN) 
0089.00      A                                      WDWBORDER((*DSPATR RI) +    
0090.00      A                                               (*COLOR RED) +     
0091.00      A                                               (*CHAR '        ') 
        ****************** End of data ****************************************


CL

*************** Beginning of data ************************************* 
0001.00              PGM                                                        
0002.00              ADDLIBLE   LIB(QPFR)                                       
0003.00              MONMSG     MSGID(CPF2103)                                  
0006.00              WRKSYSACT  OUTPUT(*FILE) NBRITV(1) LIB(QGPL)               
0007.00              MONMSG     MSGID(CPF0000)                                  
0008.00              DLYJOB     DLY(30)                                         
0009.00              ALCOBJ     OBJ((QGPL/QAITMON *FILE *EXCL))                 
0010.00              MONMSG     MSGID(CPF1002) EXEC(RETURN)                     
0011.00              CALL       ACTRPG                                          
0012.00      END:                                                               
0013.00              DLCOBJ     OBJ((QGPL/QAITMON *FILE *EXCL))                 
0014.00              RMVLIBLE   LIB(QPFR)                                       
0015.00              MONMSG     MSGID(CPF0000)                                  
0016.00              ENDPGM                                                     
        ****************** End of data ****************************************

RPG

0001.00      H                                                                  
0002.00      F*****************************************************************

                          TEXTUAL DESCRIPTION of the PROGRAM

0017.00      F***************************************************************** 
0018.00      F*                                                                 
0019.00      F* FILE NAME IS QAITMON (FILE IS BY IBM - USED IN WRKSYSACT        
0020.00      F*   AN IBM AS/400 PERFORMANCE TOOL)                               
0021.00      F*                                                                 
0022.00      FQAITMON IF  E                    DISK                           UC 
0023.00      FACTIVSUMCF  E                    WORKSTN                          
0024.00      F                                        SFLRRNKSFILE SFL          
0025.00      ILDA        UDS                                                    
0026.00      I                                        1  10 LDAJOB              
0027.00      I                                       11  20 LDAUSR              
0028.00      I                                       21  26 LDANBR              
0029.00      I*                                                                 
0030.00      I              'SIGNOFF LOG(*NOLIST)'C         SIGNOF              
0031.00      I              'QPFR/QITMON'         C         QITMON              
0032.00      I              '..1..2..3..4..5..6..-C         SCALE               
0033.00      I              '7..8..9..0'                                        
0034.00      I*                                                   
0035.00      C           *NAMVAR   DEFN *LDA      LDA             
0036.00      C*                                                   
0037.00      C*****  BEGIN MAIN PROCESSING                        
0038.00      C*                                                   
0039.00      C           *INLR     DOUEQ*ON                       
0040.00      C*                                                   
0041.00      C*****  CALL QITMON FROM QPFR                        
0042.00      C*                                                   
0043.00      C                     CLOSEQAITMON                99 
0044.00      C                     CALL QITMON                 LR 
0045.00      C                     PARM '*FILE'   QITOUT 32       
0046.00      C                     PARM 5         QITITV 155      
0047.00      C                     PARM '*CPU'    QITSEQ 32       
0048.00      C                     PARM '*ALL'    QITTYP 32       
0049.00      C                     PARM 1         QITNBR 155      
0050.00      C                     PARM 'QAITMON' QITMBR 32
0051.00      C                     PARM 'QGPL'    QITLIB 32
0052.00      C*                                            
0053.00      C           *INLR     IFEQ *ON                
0054.00      C                     LEAVE                   
0055.00      C                     ENDIF                   
0056.00      C*                                            
0057.00      C                     OPEN QAITMON            
0058.00      C*                                            
0059.00      C*****  CLEAN AND SETUP STUFF                 
0060.00      C*                                            
0061.00      C                     MOVE *OFF      *IN90    
0062.00      C                     MOVE *OFF      *IN91    
0063.00      C                     MOVE *ON       *IN92    
0064.00      C*                                            
0065.00      C                     WRITESFLCTL             
0066.00      C*                                            
0067.00      C                     MOVE *ON       *IN91
0068.00      C                     MOVE *OFF      *IN92            
0069.00      C                     MOVE *OFF      *IN50            
0070.00      C                     MOVE *OFF      *IN52            
0071.00      C                     MOVE *OFF      *IN60            
0072.00      C                     MOVE *OFF      *IN61            
0073.00      C                     MOVE *OFF      *IN62            
0074.00      C*                                                    
0075.00      C*****  GET PERFORMANCE DATA                          
0076.00      C*                                                    
0077.00      C           1         DO   14        SFLRRN  40       
0078.00      C                     READ QAITMON                9393
0079.00      C*                                                    
0080.00      C           *IN93     IFEQ *ON                        
0081.00      C                     LEAVE                           
0082.00      C                     ENDIF                           
0083.00      C*****  SETUP SUBFILE                                 
0084.00      C           SFLRRN    IFEQ 1                          
0085.00      C                     MOVE *ON       *IN90             
0086.00      C           ITVTIM    MULT .004096   ELPSEC    H       
0087.00      C           CPUTOT    MULT .004096   CPUSEC    H       
0088.00      C           CPUTOT    DIV  ITVTIM    WK0155 155H       
0089.00      C           WK0155    MULT 100       CPUPCT    H       
0090.00      C           WK0155    MULT 30        X       20H       
0091.00      C*****  SETUP SCALE                                    
0092.00      C           X         IFGT 0                           
0093.00      C           X         SUBSTSCALE     CPUGPH    P       
0094.00      C           CPUGPH    CAT  X'20':0   CPUGPH    P       
0095.00      C                     ELSE                             
0096.00      C                     MOVEL'20'      CPUGPH    P       
0097.00      C                     ENDIF                            
0098.00      C*****  CHANGE THE GRAPH COLOR BASED ON CPU PERCENTAGE 
0099.00      C                     SELEC                            
0100.00      C           CPUPCT    WHLT 60                          
0101.00      C                     MOVE *ON       *IN60             
0102.00      C           CPUPCT    WHLT 80                    
0103.00      C                     MOVE *ON       *IN61       
0104.00      C                     OTHER                      
0105.00      C                     MOVE *ON       *IN62       
0106.00      C                     ENDSL                      
0107.00      C*                                               
0108.00      C                     MOVE NAME      LDAJOB      
0109.00      C                     MOVE JOBUSR    LDAUSR      
0110.00      C                     MOVE JOBNBR    LDANBR      
0111.00      C                     OUT  LDA                   
0112.00      C                     ENDIF                      
0113.00      C*                                               
0114.00      C                     MOVE NAME      JOBNAM      
0115.00      C                     Z-ADDIOTOT     JOBIOT      
0116.00      C                     MOVE PTY       JOBPTY      
0117.00      C           CPUDLT    MULT .004096   JOBSEC    H 
0118.00      C           CPUDLT    DIV  CPUTOT    WK0155    H 
0119.00      C           WK0155    MULT 30        X         H 
0120.00      C*                                               
0121.00      C           X         IFGT 0                     
0122.00      C           X         SUBSTSCALE     JOBGPH    P 
0123.00      C           JOBGPH    CAT  X'20':0   JOBGPH    P 
0124.00      C                     ELSE                       
0125.00      C                     MOVELX'20'     JOBGPH    P 
0126.00      C                     ENDIF                      
0127.00      C*                                               
0128.00      C           WK0155    IFLT 50                    
0129.00      C                     MOVE *OFF      *IN51       
0130.00      C                     ELSE                       
0131.00      C                     MOVE *ON       *IN51       
0132.00      C                     MOVE *ON       *IN52       
0133.00      C                     ENDIF                      
0134.00      C*                                               
0135.00      C           *IN50     IFEQ *ON
0136.00      C                     MOVE *OFF      *IN50           
0137.00      C                     ELSE                           
0138.00      C                     MOVE *ON       *IN50           
0139.00      C                     ENDIF                          
0140.00      C*                                                   
0141.00      C                     WRITESFL                       
0142.00      C                     ENDDO                          
0143.00      C*                                                   
0144.00      C                     WRITEFOOT                      
0145.00      C                     WRITESFLCTL                    
0146.00      C                     SHTDN                     LR   
0147.00      C                     ENDDO                          
0148.00      C*                                                   
0149.00      C                     CLOSEQAITMON                99 
0150.00      C                     CALL 'QCMDEXC'              99 
0151.00      C                     PARM SIGNOF    CMDSTR 20       
0152.00      C                     PARM 20        CMDLEN 155
0153.00      C*                                
0154.00      C      LRNLR          EXFMTSFLCTL
   DDS   

*************** Beginning of data *************************************
0027.00      A                                      DSPSIZ(24 80 *DS3)
0028.00      A          R DUMMY                     ASSUME            
0029.00      A                                  1  2' '               
0030.00      A          R FOOT                                        
0031.00      A          R SFL                       SFL               
0032.00      A            JOBNAM        10A  O  8  2                  
0033.00      A            JOBUSR        10A  O  8 13
0034.00      A            JOBNBR         6A  O  8 24             
0035.00      A            JOBPTY         3A  O  8 31             
0036.00      A            JOBIOT         5Y 0O  8 35EDTCDE(3)    
0037.00      A            JOBSEC         5Y 2O  8 41EDTCDE(3)    
0038.00      A            JOBGPH        30A  O  8 50DSPATR(RI)   
0039.00      A  50N51                               DSPATR(HI)   
0040.00      A  51                                  DSPATR(BL)   
0041.00      A          R SFLCTL                    SFLCTL(SFL)  
0042.00      A                                      SFLSIZ(0014) 
0043.00      A                                      SFLPAG(0014) 
0044.00      A  90                                  SFLDSP       
0045.00      A  91                                  SFLDSPCTL    
0046.00      A  92                                  SFLCLR       
0047.00      A                                      FRCDTA       
0048.00      A                                      OVERLAY      
0049.00      A  52                                  ALARM        
0050.00      A                                  1 31'CPU MONITOR'
0051.00      A                                      DSPATR(HI)        
0052.00      A                                  1 71DATE              
0053.00      A                                      EDTCDE(Y)         
0054.00      A                                  2 71TIME              
0055.00      A                                      EDTCDE(3)         
0056.00      A                                  3  2'Elapsed time . :'
0057.00      A            ELPSEC         5Y 2O  3 21EDTCDE(3)         
0058.00      A                                  3 28'Seconds'         
0059.00      A                                  4  2'CPU utilization:'
0060.00      A            CPUSEC         5Y 2O  4 21EDTCDE(3)         
0061.00      A                                  4 28'Seconds'         
0062.00      A            CPUPCT         5Y 2O  4 39EDTCDE(3)         
0063.00      A                                  4 46'%'               
0064.00      A            CPUGPH        30A  O  4 50DSPATR(RI)        
0065.00      A  60                                  COLOR(BLU)        
0066.00      A  61                                  COLOR(YLW)        
0067.00      A  62                                  COLOR(RED)        
0068.00      A                                  6  2'Job or'                  
0069.00      A                                      DSPATR(HI)                
0070.00      A                                  6 35'Total'                   
0071.00      A                                      DSPATR(HI)                
0072.00      A                                  7  3'Task'                    
0073.00      A                                      DSPATR(HI)                
0074.00      A                                  7 13'User'                    
0075.00      A                                      DSPATR(HI)                
0076.00      A                                  7 24'Number'                  
0077.00      A                                      DSPATR(HI)                
0078.00      A                                  7 36'I/O'                     
0079.00      A                                      DSPATR(HI)                
0080.00      A                                  7 31'PTY'                     
0081.00      A                                      DSPATR(HI)                
0082.00      A                                  7 50'Share of CPU utilization'
0083.00      A                                      DSPATR(HI)                
0084.00      A                                  6 44'CPU'
0085.00      A                                      DSPATR(HI)                  
0086.00      A                                  7 43'Secs'                      
0087.00      A                                      DSPATR(HI)                  
0088.00      A          R CHCWDW                    WINDOW(9 2 11 32 *NOMSGLIN) 
0089.00      A                                      WDWBORDER((*DSPATR RI) +    
0090.00      A                                               (*COLOR RED) +     
0091.00      A                                               (*CHAR '        ') 
        ****************** End of data ****************************************


CL

*************** Beginning of data ************************************* 
0001.00              PGM                                                        
0002.00              ADDLIBLE   LIB(QPFR)                                       
0003.00              MONMSG     MSGID(CPF2103)                                  
0006.00              WRKSYSACT  OUTPUT(*FILE) NBRITV(1) LIB(QGPL)               
0007.00              MONMSG     MSGID(CPF0000)                                  
0008.00              DLYJOB     DLY(30)                                         
0009.00              ALCOBJ     OBJ((QGPL/QAITMON *FILE *EXCL))                 
0010.00              MONMSG     MSGID(CPF1002) EXEC(RETURN)                     
0011.00              CALL       ACTRPG                                          
0012.00      END:                                                               
0013.00              DLCOBJ     OBJ((QGPL/QAITMON *FILE *EXCL))                 
0014.00              RMVLIBLE   LIB(QPFR)                                       
0015.00              MONMSG     MSGID(CPF0000)                                  
0016.00              ENDPGM                                                     
        ****************** End of data ****************************************

RPG

0001.00      H                                                                  
0002.00      F*****************************************************************

                          TEXTUAL DESCRIPTION of the PROGRAM

0017.00      F***************************************************************** 
0018.00      F*                                                                 
0019.00      F* FILE NAME IS QAITMON (FILE IS BY IBM - USED IN WRKSYSACT        
0020.00      F*   AN IBM AS/400 PERFORMANCE TOOL)                               
0021.00      F*                                                                 
0022.00      FQAITMON IF  E                    DISK                           UC 
0023.00      FACTIVSUMCF  E                    WORKSTN                          
0024.00      F                                        SFLRRNKSFILE SFL          
0025.00      ILDA        UDS                                                    
0026.00      I                                        1  10 LDAJOB              
0027.00      I                                       11  20 LDAUSR              
0028.00      I                                       21  26 LDANBR              
0029.00      I*                                                                 
0030.00      I              'SIGNOFF LOG(*NOLIST)'C         SIGNOF              
0031.00      I              'QPFR/QITMON'         C         QITMON              
0032.00      I              '..1..2..3..4..5..6..-C         SCALE               
0033.00      I              '7..8..9..0'                                        
0034.00      I*                                                   
0035.00      C           *NAMVAR   DEFN *LDA      LDA             
0036.00      C*                                                   
0037.00      C*****  BEGIN MAIN PROCESSING                        
0038.00      C*                                                   
0039.00      C           *INLR     DOUEQ*ON                       
0040.00      C*                                                   
0041.00      C*****  CALL QITMON FROM QPFR                        
0042.00      C*                                                   
0043.00      C                     CLOSEQAITMON                99 
0044.00      C                     CALL QITMON                 LR 
0045.00      C                     PARM '*FILE'   QITOUT 32       
0046.00      C                     PARM 5         QITITV 155      
0047.00      C                     PARM '*CPU'    QITSEQ 32       
0048.00      C                     PARM '*ALL'    QITTYP 32       
0049.00      C                     PARM 1         QITNBR 155      
0050.00      C                     PARM 'QAITMON' QITMBR 32
0051.00      C                     PARM 'QGPL'    QITLIB 32
0052.00      C*                                            
0053.00      C           *INLR     IFEQ *ON                
0054.00      C                     LEAVE                   
0055.00      C                     ENDIF                   
0056.00      C*                                            
0057.00      C                     OPEN QAITMON            
0058.00      C*                                            
0059.00      C*****  CLEAN AND SETUP STUFF                 
0060.00      C*                                            
0061.00      C                     MOVE *OFF      *IN90    
0062.00      C                     MOVE *OFF      *IN91    
0063.00      C                     MOVE *ON       *IN92    
0064.00      C*                                            
0065.00      C                     WRITESFLCTL             
0066.00      C*                                            
0067.00      C                     MOVE *ON       *IN91
0068.00      C                     MOVE *OFF      *IN92            
0069.00      C                     MOVE *OFF      *IN50            
0070.00      C                     MOVE *OFF      *IN52            
0071.00      C                     MOVE *OFF      *IN60            
0072.00      C                     MOVE *OFF      *IN61            
0073.00      C                     MOVE *OFF      *IN62            
0074.00      C*                                                    
0075.00      C*****  GET PERFORMANCE DATA                          
0076.00      C*                                                    
0077.00      C           1         DO   14        SFLRRN  40       
0078.00      C                     READ QAITMON                9393
0079.00      C*                                                    
0080.00      C           *IN93     IFEQ *ON                        
0081.00      C                     LEAVE                           
0082.00      C                     ENDIF                           
0083.00      C*****  SETUP SUBFILE                                 
0084.00      C           SFLRRN    IFEQ 1                          
0085.00      C                     MOVE *ON       *IN90             
0086.00      C           ITVTIM    MULT .004096   ELPSEC    H       
0087.00      C           CPUTOT    MULT .004096   CPUSEC    H       
0088.00      C           CPUTOT    DIV  ITVTIM    WK0155 155H       
0089.00      C           WK0155    MULT 100       CPUPCT    H       
0090.00      C           WK0155    MULT 30        X       20H       
0091.00      C*****  SETUP SCALE                                    
0092.00      C           X         IFGT 0                           
0093.00      C           X         SUBSTSCALE     CPUGPH    P       
0094.00      C           CPUGPH    CAT  X'20':0   CPUGPH    P       
0095.00      C                     ELSE                             
0096.00      C                     MOVEL'20'      CPUGPH    P       
0097.00      C                     ENDIF                            
0098.00      C*****  CHANGE THE GRAPH COLOR BASED ON CPU PERCENTAGE 
0099.00      C                     SELEC                            
0100.00      C           CPUPCT    WHLT 60                          
0101.00      C                     MOVE *ON       *IN60             
0102.00      C           CPUPCT    WHLT 80                    
0103.00      C                     MOVE *ON       *IN61       
0104.00      C                     OTHER                      
0105.00      C                     MOVE *ON       *IN62       
0106.00      C                     ENDSL                      
0107.00      C*                                               
0108.00      C                     MOVE NAME      LDAJOB      
0109.00      C                     MOVE JOBUSR    LDAUSR      
0110.00      C                     MOVE JOBNBR    LDANBR      
0111.00      C                     OUT  LDA                   
0112.00      C                     ENDIF                      
0113.00      C*                                               
0114.00      C                     MOVE NAME      JOBNAM      
0115.00      C                     Z-ADDIOTOT     JOBIOT      
0116.00      C                     MOVE PTY       JOBPTY      
0117.00      C           CPUDLT    MULT .004096   JOBSEC    H 
0118.00      C           CPUDLT    DIV  CPUTOT    WK0155    H 
0119.00      C           WK0155    MULT 30        X         H 
0120.00      C*                                               
0121.00      C           X         IFGT 0                     
0122.00      C           X         SUBSTSCALE     JOBGPH    P 
0123.00      C           JOBGPH    CAT  X'20':0   JOBGPH    P 
0124.00      C                     ELSE                       
0125.00      C                     MOVELX'20'     JOBGPH    P 
0126.00      C                     ENDIF                      
0127.00      C*                                               
0128.00      C           WK0155    IFLT 50                    
0129.00      C                     MOVE *OFF      *IN51       
0130.00      C                     ELSE                       
0131.00      C                     MOVE *ON       *IN51       
0132.00      C                     MOVE *ON       *IN52       
0133.00      C                     ENDIF                      
0134.00      C*                                               
0135.00      C           *IN50     IFEQ *ON
0136.00      C                     MOVE *OFF      *IN50           
0137.00      C                     ELSE                           
0138.00      C                     MOVE *ON       *IN50           
0139.00      C                     ENDIF                          
0140.00      C*                                                   
0141.00      C                     WRITESFL                       
0142.00      C                     ENDDO                          
0143.00      C*                                                   
0144.00      C                     WRITEFOOT                      
0145.00      C                     WRITESFLCTL                    
0146.00      C                     SHTDN                     LR   
0147.00      C                     ENDDO                          
0148.00      C*                                                   
0149.00      C                     CLOSEQAITMON                99 
0150.00      C                     CALL 'QCMDEXC'              99 
0151.00      C                     PARM SIGNOF    CMDSTR 20       
0152.00      C                     PARM 20        CMDLEN 155
0153.00      C*                                
0154.00      C      LRNLR          EXFMTSFLCTL

Dig deeper on iSeries skills

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close