User-defined Options in AS400

User- defined Options in AS400
User defined Options in AS400, user defined option, how
User-defined Options in AS400

User-Defined Option

User-defined options are the user-created shortcut command which can activate a specific function by typing that shortcut words against source member on the Work with Members Using PDM screen (WRKMBRPDM).

For Example Option C for calling a program, CC for changing the current library, SP for WRKSPLF, WS for WRKSBMJOB, RQ for RunQry, etc. Please note that the shortcut keyword which is mentioned in this blog is the one that is defined. There may be changes at your end the shortcut words for these commands may be different or you can define your own set of shortcut commands for a specific function.

Work with User-Defined options

  1. Type WRKMBRPDM on the command line and press ENTER, if you want you may specify the source physical file or library information to browse that using WRKMBRPDM
  2. WRKMBRPDM

    or

                         Work with Members Using PDM (WRKMBRPDM)   
                                                                   
     Type choices, press Enter.                                    
                                                                   
     File . . . . . . . . . . . . . . FILE           RPGLE         
       Library  . . . . . . . . . . .                  EASYCLASS1  
     Member . . . . . . . . . . . . . MBR            *ALL          
     Member type  . . . . . . . . . . MBRTYPE        *ALL          
    

    The below screen appears after doing WRKMBRPDM

                                 Work with Members Using PDM            
                                                                      
     File  . . . . . .   RPGLE                                        
       Library . . . .     EASYCLASS1           Position to  . . . . .
                                                                      
     Type options, press Enter.                                       
      2=Edit         3=Copy  4=Delete 5=Display       6=Print     7=Re
      8=Display description  9=Save  13=Change text  14=Compile  15=Cr
                                                                      
     Opt  Member      Type        Text                                
          PF20        PF          Physical file (RGZPFM)              
          RPGLE1      RPGLE       Converting numeric currency to words
          RPGLE10     RPGLE       Qualified Data structure in RPGLE   
          RPGLE11     RPGLE       Indicator data structure in RPGLE   
          RPGLE11#1   RPGLE       Indicator data structure in RPGLE   
          RPGLE11#2   RPGLE       Indicator data structure in RPGLE   
          RPGLE11DSP  DSPF        Display file to show INDARA demo    
          RPGLE12     RPGLE       data area data structure in RPGLE   
                                                                      
     Parameters or command                                            
     ===>                                                             
     F3=Exit          F4=Prompt             F5=Refresh            F6=C
     F9=Retrieve      F10=Command entry     F23=More options      F24=
     
  3. Press SHIFT+F4 on the WRKMBRPDM screen
  4. You will see the Work with User-Defined option screen

                            Work with User-Defined Options                  
                                                                          
    File . . . . . . . :   QAUOOPT          Member . . . . . . :   QAUOOPT
      Library  . . . . :     QGPL           Position to  . . . :          
                                                                          
    Type options, press Enter.                                            
      2=Change         3=Copy         4=Delete         5=Display          
                                                                          
    Opt  Option  Command                                                       
     _      C    CALL &O/&N                                                           
     _     CC    CHGCURLIB CURLIB(&L)                                                                                                                                                                                           
    Command                                                               
    ===>                                                                  
    F3=Exit             F4=Prompt           F5=Refresh       F6=Create    
    F9=Retrieve         F10=Command entry                    F24=More keys
    
  5. We can take option 2 to change an option and its command,, option 5 to display, 3 to copy, and 4 to delete the shortcut option and command.
  6. For creating a new command we can press F6 to Create the User-defined option JL for the command DSPJOBLOG
  7.                         Display User-Defined Option                            
                                                                                   
     Press Enter to continue.                                                      
                                                                                   
       Option  . . . . . . . . :   JL                                              
                                                                                    
       Command . . . . . . . . :   DSPJOBLOG                    
                                                                                   
                                                                                    
                                                                                   
                                                                               
                                                                                   
                                                                                    
                                                                                   
     F3=Exit       F12=Cancel 
     

    Press ENTER to create the option.

  8. once the option JL gets created as can be seen below. You can use the thing option by writing JL on any source physical file member in any library instead of writing DSPJOBLOG on the command line.
  9.                         Work with User-Defined Options                  
                                                                          
    File . . . . . . . :   QAUOOPT          Member . . . . . . :   QAUOOPT
      Library  . . . . :     QGPL           Position to  . . . :          
                                                                          
    Type options, press Enter.                                            
      2=Change         3=Copy         4=Delete         5=Display          
                                                                          
    Opt  Option  Command                                                       
     _      C    CALL &O/&N      
     _     CC    CHGCURLIB CURLIB(&L)
     _     JL    DSPJOBLOG
    
     
    Command                                                               
    ===>                                                                  
    F3=Exit             F4=Prompt           F5=Refresh       F6=Create    
    F9=Retrieve         F10=Command entry                    F24=More keys
    

    Type JL on the source member on WRKMBRPDM.

                              Work with Members Using PDM               
                                                                        
    File  . . . . . .   RPGLE                                           
      Library . . . .     EASYCLASS1           Position to  . . . . .   
                                                                        
    Type options, press Enter.                                          
     2=Edit         3=Copy  4=Delete 5=Display       6=Print     7=Renam
     8=Display description  9=Save  13=Change text  14=Compile  15=Creat
                                                                        
    Opt  Member      Type        Text                                   
    JL   PF20        PF          Physical file (RGZPFM)                 
         RPGLE1      RPGLE       Converting numeric currency to words in
         RPGLE10     RPGLE       Qualified Data structure in RPGLE      
         RPGLE11     RPGLE       Indicator data structure in RPGLE      
         RPGLE11#1   RPGLE       Indicator data structure in RPGLE      
         RPGLE11#2   RPGLE       Indicator data structure in RPGLE      
         RPGLE11DSP  DSPF        Display file to show INDARA demo       
         RPGLE12     RPGLE       data area data structure in RPGLE      
                                                                        
    Parameters or command                                               
    ===>                                                                
    

    DSPJOBLOG screen

                                  Display Job Log                
                                                                S
    Job . . :   QPAD061843    User . . :   EASYCLASS     Number .
                                                                 
    4>> DSPJOBLOG                                                
                                                                 
                                                                 
    

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain