Chapter 6 - Creating and Using User Defined Options in OBJTOOL

OBJTOOL allows users to create user defined options very similar to the way you can create user defined options with PDM.

The difference between the user options in OBJTOOL and PDM is that OBJTOOL allows you to create options at the type and attribute level. This means if you create an option "E" for edit, you can run a different command for RPGLE members and another for DSPF members.

User defined options are create using the F16=User Options function key. When you use this function key, you will be shown a list of currently defined user options as shown below:

12/13/03                    Object Tools (OBJTOOL)
17:17:51                     Command Maintenance                     BVSTONE
User ID . . . BVSTONE
Type options, press Enter.
 1=Add   2=Work with Command   3=Copy   4=Delete
Opt ID Type       Attribute
 _  __ __________ __________ _________________________________________________
 _  SP *ALL       *ALL       WRKSPLF
 _  B1 RPGLE      *ALL       CRTBNDRPG PGM(&L/&M) SRCFILE(&L/&O) DFTACTGRP(...
 _  B2 RPGLE      *ALL       CRTBNDRPG PGM(&L/&M) SRCFILE(&L/&O) DFTACTGRP(...
 _  B3 RPGLE      *ALL       CRTBNDRPG PGM(&L/&M) SRCFILE(&L/&O) DFTACTGRP(...
 _  C  RPGLE      *ALL       CALL PGM(&L/&M)
 _  SD RPGLE      *ALL       STRDBG PGM(&L/&M) UPDPROD(*YES)
                                                                     Bottom
F3=Exit   F4=Prompt   F5=Refresh 

The options listed allow you to add, change, work with, or delete the current user option.

When creating user options, you can substitute special characters for parameters. A list and description of each follows:

  • &O - Object Name - Use this parameter to substitute the object name into the command you wish to call.
  • &M - Member Name - Use the parameter to substitute the member name into the command you wish to call. (Note, when working with members, &O and &M work the same).
  • &L - Library - Use the parameter to substitute the library into the command you wish to call.
  • &T - Type - Use the parameter to substitute the object or member type into the command you wish to call.
  • &A -Attribute - Use the parameter to substitute the object or member attribute into the command you wish to call.

** NOTE: When using these parameters as input parameters when calling a program defined as a user option, (as opposed to calling a command such as DSPSPLF), enclose the parameters in quotation marks.