Example of creating a User Defined service


Following is an example of creating a user-defined service to be used with a worklist format.

In this example, you create a service named IKJEFT01. This service executes the DISPLAY DATABASE command, which shows the status of your database and is called from an action named DISPLYDB.

To create a User-defined service

  1. On the DASD MANAGER PLUS Main Menu, select Services and press Enter.The Services Menu panel is displayed.

    DEMO ------------------------------ Services Menu -----------------------------
    Command ===>                                                                   
                                                                                  
    A Service is a program or utility that runs as part of an Action. Type a       
    specific Service or type a wildcard pattern for a selection list.              
                                                                                  
    Service . . . %                                                                
                                                                                  
    Select an option. Then press Enter.                                            
       1. List                                                                     
       2. Create a new User Defined Service                                        
       3. Edit a Service Syntax Options                                            
       4. Edit a Service Properties                                                
       5. Delete a User Defined Service                                            
       6. List Action Impact
  2. From the Services Menu, select Create a new User Defined Service to display the Create User Defined Service panel.The Create User Defined Service panel is displayed.

    DEMO ----------------------- Create User Defined Service ----------------------
    Command ===>                                                                   
                                                                                  
    Type new Service data. Then press Enter.                                       
                                                                                  
    Name . . . . .                                                                 
    Type . . . . .           (i.e. PROGRAM, COPY, STAT, REPORT, etc...)            
    Program Name .           (Program for EXEC PGM=)                               
    APF  . . . . . N         (Y/N APF authorized)                                  
    Attach key . . 8         (1-8 Attach key)                                      
    Program Parm .                                                                 
                 .                                                                 
    Description  .                                                                 
                 .                                                                 
                                                                                  
    Select edit option. Then press Enter.                                          
    Program Details . .   1. DD statements                                         
                          2. Syntax Template
  3. In the Create User Defined Service panel, enter the following information:

    1. In the Name field, type the Service name IKJEFT01.
    2. In the Type field, PROGRAM.
    3. In the Program Name field type the program name as it appears in the JCL in the PGM= keyword (in this example, IKJEFT01).
    4. In the APF field, type Y to authorize APF. (In this example, IKJEFT01 requires authorization.)
    5. In the Select edit option field, type 1 for DD statements, and press Enter.

    Edit Services Properties panel with information entered

    The Create DD Statement panel is displayed.


    DEMO --------------------------- Create DD Statement ----------- Service added
    Command ===>                                                                   
    Type new DD Statement data. Then press Enter.                                  
                                                                                  
    Service  . . : IKJEFT01                                                        
    DD name  . . .                                                                 
    Type . . . . .          (INFILE, OUTFILE, REPORT, PGMLIB)                      
    Data set name                                                                  
    Description  .                                                                 
                                                                                  
    DD Statement text (free-form)                                                  
                                                                                  
    Restart DD Statement text (free-form)
  4. In the Create DD Statement panel, enter the following information:

    1. In the DD name field, type SYSTSPRT.
    2. In the Type field, type REPORT.

      Create DD Statement with information entered

      DEMO --------------------------- Create DD Statement ----------- Service added
      Command ===>                                                                  
      Type new DD Statement data. Then press Enter.                                 
                                                                                   
      Service  . . : IKJEFT01                                                       
      DD name  . . . SYSTSPRT                                                       
      Type . . . . . REPORT   (INFILE, OUTFILE, REPORT, PGMLIB)                     
      Data set name                                                                 
      Description  .                                                                
                                                                                   
      DD Statement text (free-form)                                                 
                                                                                   
      Restart DD Statement text (free-form)

      The DD name and Type fields tell the JCL Generation function where to send the output.

    3. Press END to save your changes and return to the DD Statement list panel, which now looks like this:


      DEMO  ----------------------- DD Statement List ---------      Row 1 to 1 of 1
      Command ===>                                                  Scroll ===> PAGE
                                                                                    
      Service: IKJEFT01                                                              
                                                                                    
      For user-defined services, enter all DDs needed. For BMC and DB2 utilities, the
      standard DDs are defined in the JCL Options file and in the Service Syntax, and
      this list only contains special case DD additions.                             
                                                                                    
      C =Create   D =Delete   E =Edit   L =Like   A =After  B =Before  M =Move       
                                                                       More:       >
      Act Name      Type      Dataset Name                                           
      ******************************** Top of data **********************************
          SYSTSPRT  REPORT                                                           
      ******************************* Bottom of data ********************************

    Important

    For BMC Software required services, this list contains only DD statements that are not in the JCL Product Options File (POF) or syntax options. Do not add DD statements for BMC required services.

    Do not add a DD statement for the input (such as SYSIN). The syntax DD is named as part of the service syntax definition. The syntax DD is allocated to a job entry subsystem (JES) input stream for standard JCL. The syntax DD is allocated to a temporary data set if you run it in worklist format under AEXMAIN.

  5. Press END to exit the DD Statement List panel and return to the Edit Services Properties panel.
  6. In the Create User Defined Service panel, select 2 (Syntax Template) in the Select Edit Option field.The Create Service Syntax panel is displayed.
  7. In the Create Service Syntax panel, enter the following information:

    1. In the Syntax field, type DISPLAYDATABASE.
    2. In the DDName field, type SYSTSIN.The panel should appear as shown in the following figure.

      Create Service Syntax

      DEMO -------------------------- Create Service Syntax -------------------------
      Command ===>                                                                   
                                                                                    
      Press Enter to continue updating syntax options.                               
                                                                                    
      Service  . . . . : IKJEFT01                                                    
      Syntax . . . . . . DISPLAYDATABASE                                             
      Owner  . . . . . . MVSNXL1                                                     
      DDName . . . . . . SYSTSIN                                                     
                                                                                    
      Description  . . .
    3. Press Enter to continue updating options and to include the syntax.

    An editing panel is displayed.

  8. Starting in column 2, enter the following syntax, and then press END to save the changes:

    DSN SYSTEM(&SSID)
    -DISPLAY DATABASE(&DBNAME) SPACE(&SPNAME) LIMIT(*)

    Important

    JCL Execution does not execute SQL commands in worklist format. BMCTRIG must generate SQL commands in standard JCL format.

    The Service Syntax List panel appears.


    DEMO ---------- Service Syntax List ------- ---------         Row 1 to 1 of 1  
    Command ===>                                                  Scroll ===> PAGE
                                                                                  
    Service . . . : IKJEFT01                                                       
    Default Syntax: DISPLAYDATABASE                                                
                                                                                  
    Select an option or change Display filter. Then press Enter. To change         
    the default syntax, select another syntax with the 'F' option.                 
                                                                                  
    B =Browse      C =Create         D =Delete       E =Edit   L =Like             
    P =Properties  A =Action Impact  V =View Syntax  F =Set default syntax         
                                                                                  
    Display filter                                                                 
      Owner.Name . . . %.%                                                         
                                                                     More:   -   >
    Act Dflt Name                                      Owner     Description       
          Y  DISPLAYDATABASE                           MVSNXL1                     
    ******************************* Bottom of data ********************************
  9. Press END to return to Edit Services Properties.
  10. Press END to complete the User Defined Exception and return to Services Main Menu.
  11. Create an Action and associate the IKJEFT01 user defined service.For more information about associating, see Editing-Services-for-an-Action.



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*