Carsten's Corner - New Subsystem Entry Commands - Part Two
Date Posted: April 07, 2010 12:00 AM

Today I continue where I left off last time, adding to the collection of subsystem entry commands. In the first installment of this article series I presented the WRKJOBQE, the WRKJOBQJOB and the WRKRTGE commands. Now its time to introduce you to the Work with Prestart Job Entries (WRKPJE), the Work with Autostart Job Entries (WRKAJE) as well as the Submit Job Description Job (SBMJOBDJOB) commands. Let’s begin with the former, displaying the WRKPJE command prompt:



                     Work with Prestart Job Entries (WRKPJE)               
                                                                           
 Type choices, press Enter.                                                
                                                                           
 Subsystem  . . . . . . . . . . .                 Name                     
   Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB     


As usual, a help text panel group provides all the details on the command and its parameter. Running the WRKPJE command against the QCMN subsystem on my system eventually causes the following list panel to appear:




                         Work with Prestart Job Entries                WYNDHAMW 
                                                             21-02-10  13:35:24 
 Subsystem  . . . :   QCMN                Subsystem status :   *ACTIVE          
   Library  . . . :     QSYS                                                    
                                                                                
 Type options, press Enter.                                                     
   2=Change   3=Copy   4=Remove   5=Work with Job description   6=Display jobs  
   7=Work with program   8=Work with active jobs   9=Start prestart job         
                                                                                
                                          Start  Wait     ---Thread affinity--- 
 Opt  Program     Library     User        Jobs   for job  Group      Level      
      QOQSESRV    QSYS        QUSER       *NO     *YES    *SYSVAL               
      QNMAPINGD   QSYS        QUSER       *YES    *YES    *SYSVAL               
      QNMAREXECD  QSYS        QUSER       *YES    *YES    *SYSVAL               
      QACSOTP     QSYS        QUSER       *YES    *YES    *SYSVAL               
      QZRCSRVR    QSYS        QUSER       *YES    *YES    *SYSVAL               
      QZSCSRVR    QSYS        QUSER       *YES    *YES    *SYSVAL               
      QNPSERVR    QSYS        QUSER       *YES    *YES    *SYSVAL               
                                                                        More... 
 Parameters or command                                                          
 ===>                                                                           
 F3=Exit      F4=Prompt   F5=Refresh   F6=Add prestart job entry   F9=Retrieve  
 F11=View 2   F12=Cancel   F21=Print list   F24=More keys                       



The above list panel offers eight list options, each allowing you to perform a specific command against the selected prestart job entries and also the function key F6 to add a new prestart job entry. You’ll find cursor sensitive online help text to explain each part of the above list panel as well as the list options and function keys. At this point it is probably not all that surprising to learn that the WRKAJE command is modeled over the same skeleton as the previously presented subsystem entry commands – as usual, let us begin with the command prompt:




                     Work with Autostart Job Entrs (WRKAJE)                   
                                                                              
 Type choices, press Enter.                                                   
                                                                              
 Subsystem  . . . . . . . . . . .                 Name                        
   Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB        
                                                                              


Again, a help text panel group reveals the details of the command and its parameter. Below is an example of how the resulting list panel looks when run for subsystem APPSVR01 in library QGPL on my system:




                        Work with Autostart Job Entries                WYNDHAMW
                                                             21-02-10  13:37:57
 Subsystem  . . . :   APPSVR01          Subsystem status :   *ACTIVE         
   Library  . . . :     QGPL                                                   
                                                                               
 Type options, press Enter.                                                    
   2=Change   3=Copy         4=Remove   5=Work with job description            
   8=Work with active jobs   9=Submit job                                      
                                                                               
                  Job                                                          
 Opt  Job         Description  Library     Text                                
  9   RUNWEBAPP   WEB001JD     QUSRSYS     Web application server job     
      RUNCSRAPP   CSR550JD     QUSRSYS     CSR application server job               
                                                                               

                                                                               
                                                                               
                                                                         Bottom
 Parameters or command                                                         
 ===>                                                                          
 F3=Exit   F4=Prompt   F5=Refresh   F6=Add autostart job entry   F9=Retrieve   
 F10=Work with subsystem jobs   F12=Cancel   F21=Print list      F24=More keys



You have options to change, copy and remove autostart job entries and also to work with the job description associated with it. Additionally you’re capable of working with the currently active autostart entry jobs as well as submit any of the listed autostart jobs. As for the latter option, this is supported by the SBMJOBDJOB command, the prompt panel of which is introduced below:



                     Submit Job Description Job (SBMJOBDJOB)                   
                                                                               
 Type choices, press Enter.                                                    
                                                                               
 Job name . . . . . . . . . . . . > RUNWEBAPP     Name                         
 Job description  . . . . . . . . > WEB001JD      Name, *JOB                   
   Library  . . . . . . . . . . . >   QUSRSYS     Name, *LIBL, *CURLIB         
 Parameter option . . . . . . . . > *USRPRF       *USRPRF, *SYSVAL             
                                                                               



The command and its parameters are explained in detail in the accompanying help text. In essence, the SBMJOBDJOB runs the Submit Job (SBMJOB) command with all crucial parameters pointing to the job description associated with the autostart job entry, specifying the special value *JOBD for the respective SBMJOB command parameters. This in turn has the same effect as when the subsystem submits an autostart job as part of the subsystem initiation process.

For the few SBMJOB command parameters not supporting a *JOBD special value, you have the option of determining whether the special value *USRPRF, pointing to the corresponding user profile attribute of the user profile referred to by the autostart job description, or the special value *SYSVAL pointing to the corresponding system value as the origin of the parameter in question. Note that in the latter case parameters that do not have a *SYSVAL option will be given the special value *NONE or a special value to the equivalent effect.

The Work with Autostart Job Entries and the Submit Job Description commands originally appeared in the Programming Tips Newsletter. The article discussing the two commands in great detail can be found here.

Next time around I’ll present subsystem entry commands dealing with subsystem communication entries as well as work station entries by name and type. In the final installment of this article series I’ll also provide a Work with Subsystem Entries (WRKSBSE) command, tying together all the new work with-subsystem entry commands. In the mean time, if you want to learn more about subsystem entries and the crucial role they play in System i work management, please follow this link.

The following sources are involved in creating the WRKPJE, WRKAJE and SBMJOBD commands:


CBX9961  -- RPGLE  -- Work with Prestart Job Entries - CCP             
CBX9961E -- RPGLE  -- Work with Prestart Job Entries - UIM Exit Program
CBX9961H -- PNLGRP -- Work with Prestart Job Entries - Help            
CBX9961P -- PNLGRP -- Work with Prestart Job Entries - Panel Group     
CBX9961V -- RPGLE  -- Work with Prestart Job Entries - VCP             
CBX9961X -- CMD    -- Work with Prestart Job Entries                   

CBX9962  -- RPGLE  -- Work with Autostart Job Entries - CCP             
CBX9962E -- RPGLE  -- Work with Autostart Job Entries - UIM Exit Program
CBX9962H -- PNLGRP -- Work with Autostart Job Entries - Help            
CBX9962P -- PNLGRP -- Work with Autostart Job Entries - Panel Group     
CBX9962V -- RPGLE  -- Work with Autostart Job Entries - VCP             
CBX9962X -- CMD    -- Work with Autostart Job Entries                   

CBX9963  -- CLP    -- Submit Job Description Job - CPP  
CBX9963H -- PNLGRP -- Submit Job Description Job - Help 
CBX9963V -- RPGLE  -- Submit Job Description Job - VCP  
CBX9963X -- CMD    -- Submit Job Description Job        

CBX9961M -- CLP    -- Work with Prestart Job Entries - Build command   
CBX9962M -- CLP    -- Work with Autostart Job Entries - Build command   

Click here to download all of the source code for these great commands

To create all above objects, compile and run CBX9961M and CBX9962M, following the instructions in each source header. As always, you’ll also find compilation instructions in the respective source headers.


Want to use this article? Click here for options!
Want to subscribe? Click here!
There are no comments to display. Be the first to add your thoughts!
You must log on before posting a comment.

Are you a new visitor? Register Here
 

around the forums

PASE - HTMLDOC (Scott's binary version) Error: please Help!
Forum Name: RPG
16 May 2012 01:58 PM | Replies: 3
IFS directory structure
Forum Name: Systems Management
16 May 2012 11:52 AM | Replies: 2
IFS folder/file authority
Forum Name: Communications/Networking
16 May 2012 08:45 AM | Replies: 6

ProVIP Sponsors

BCD

Join Our Community!

Subscribe today to iPro Developer! iPro Developer is packed with technical know-how for developers of IBM i, iSeries, AS400 and System i. Sign up now to get your full subscriber benefits including:

  • Code available for download
  • Full access to the online article archive (including all System iNEWS ProVIP content)
  • Downloadable ebook with past 6 months of articles
  • Discounts on eLearning classes, self-paced training, in-person events, and more!
iPro Developer Newsletters
  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips