RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

List jobq info using QSPRJOBQ Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   

Sample from Jamie Flanary (www.code400.com)


      H Option(*SRCSTMT:*NODEBUGIO)                                                                  
                                                                                                    
     d CmdLength       s             15  5                                                          
     d CmdString       s            512                                                             
     d Reply           s              1                                                             
                                                                                                    
     d $GetJobq        pr                  EXTPGM('QSPRJOBQ')                                       
     d  RECIEVER                    144A                                                            
     d  RCVRLEN                      10I 0 const                                                    
     d  FORMAT                        8A   const                                                    
     d  JOBQ                         20A   consT                                                    
     d  ERROR                       116A                                                            
      *                                                                                             
     dMyJobQDS         DS                  Qualified                                                
     d BytesReturned                 10i 0                                                          
     d BytesAvailable                10i 0                                                          
     d JobQName                      10                                                             
     d JobQLib                       10                                                             
     d OppControlled                 10                                                             
     d AuthorityChk                  10                                                             
     d NumberOfJobs                  10i 0                                                          
     d JobqStatus                    10                                                             
     d SubsystemName                 10                                                             
     d SubsystemLib                  10                                                             
     d Description                   50                                                             
     d Sequence#                     10i 0                                                          
     d MaximumActive                 10i 0                                                          
     d CurrentActive                 10i 0                                                          
     d MaxActPri1                    10i 0                                                          
     d MaxActPri2                    10i 0                                                          
     d MaxActPri3                    10i 0                                                          
     d MaxActPri4                    10i 0                                                          
     d MaxActPri5                    10i 0                                                          
     d MaxActPri6                    10i 0                                                          
     d MaxActPri7                    10i 0                                                          
     d MaxActPri8                    10i 0                                                          
     d MaxActPri9                    10i 0                                                          
     d ActJobsPri1                   10i 0                                                          
     d ActJobsPri2                   10i 0                                                          
     d ActJobsPri3                   10i 0                                                          
     d ActJobsPri4                   10i 0                                                          
     d ActJobsPri5                   10i 0                                                          
     d ActJobsPri6                   10i 0                                                          
     d ActJobsPri7                   10i 0                                                          
     d ActJobsPri8                   10i 0                                                          
     d ActJobsPri9                   10i 0                                                          
     d ActJobsPri10                  10i 0                                                          
     d RlsJObsOnQ1                   10i 0                                                          
     d RlsJObsOnQ2                   10i 0                                                          
     d RlsJObsOnQ3                   10i 0                                                          
     d RlsJObsOnQ4                   10i 0                                                          
     d RlsJObsOnQ5                   10i 0                                                          
     d RlsJObsOnQ6                   10i 0                                                          
     d RlsJObsOnQ7                   10i 0                                                          
     d RlsJObsOnQ8                   10i 0                                                          
     d RlsJObsOnQ9                   10i 0                                                          
     d RlsJObsOnQ10                  10i 0                                                          
     d SchJobsOnQ1                   10i 0                                                          
     d SchJobsOnQ2                   10i 0                                                          
     d SchJobsOnQ3                   10i 0                                                          
     d SchJobsOnQ4                   10i 0                                                          
     d SchJobsOnQ5                   10i 0                                                          
     d SchJobsOnQ6                   10i 0                                                          
     d SchJobsOnQ7                   10i 0                                                          
     d SchJobsOnQ8                   10i 0                                                          
     d SchJobsOnQ9                   10i 0                                                          
     d SchJobsOnQ10                  10i 0                                                          
     d HldJobsOnQ1                   10i 0                                                          
     d HldJobsOnQ2                   10i 0                                                          
     d HldJobsOnQ3                   10i 0                                                          
     d HldJobsOnQ4                   10i 0                                                          
     d HldJobsOnQ5                   10i 0                                                          
     d HldJobsOnQ6                   10i 0                                                          
     d HldJobsOnQ7                   10i 0                                                          
     d HldJobsOnQ8                   10i 0                                                          
     d HldJobsOnQ9                   10i 0                                                          
     d HldJobsOnQ10                  10i 0                                                          
      *                                                                                             
      * Standard API error data structure                                                           
      *                                                                                             
     d APIError        ds                  Qualified                                                
     d  BytesP                 1      4I 0 inz(%size(apiError))                                     
     d  BytesA                 5      8I 0 inz(0)                                                   
     d  Messageid              9     15                                                             
     d  Reserved              16     16                                                             
     d  messagedta            17    256                                                             
                                                                                                    
     d $command        pr                  extpgm('QCMDEXC')                                        
     d   command                    512                                                             
     d   Length                      15  5                                                          
      *                                                                                             
                                                                                                    
      // ****************************************************************** //                      
      // *  Main Calculations                                             * //                      
      // ****************************************************************** //                      
                                                                                                    
      /Free                                                                                         
                                                                                                    
       $getJobQ(MyJobQDS:%SIZE(MyJobQDS):'JOBQ0200':                                                
                   'QBATCH    QGPL':APIERROR);                                                      
                                                                                                    
       DSPLY MyJobQDS.JobQStatus Reply;                                                             
                                                                                                    
       cmdstring = 'HLDJOBQ QBATCH';                                                                
       cmdlength = %len(%trim(cmdstring));                                                          
       // $command(cmdstring: cmdlength);                                                           
                                                                                                    
       cmdstring = 'RLSJOBQ QBATCH';                                                                
       cmdlength = %len(%trim(cmdstring));                                                          
       // $command(cmdstring: cmdlength);                                                           
                                                                                                    
       *inlr = *on;                                                                                 
                                                                                                    
      /End-Free 

User Comments

Please login or register to add comments

<Previous   Next>