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
- On the DASD MANAGER PLUS Main Menu, select Services and press Enter.The Services Menu panel is displayed. DEAE ------------------------------ 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
- 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. DEAE ----------------------- 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
- In the Create User Defined Service panel, enter the following information: - In the Name field, type the Service name IKJEFT01.
- In the Type field, PROGRAM.
- In the Program Name field type the program name as it appears in the JCL in the PGM= keyword (in this example, IKJEFT01).
- In the APF field, type Y to authorize APF. (In this example, IKJEFT01 requires authorization.)
- In the Select edit option field, type 1 for DD statements, and press Enter.
 - Edit Services Properties panel with information entered DEAE ----------------------- Create User Defined Service ----------------------
 Command ===>
 
 Type new Service data. Then press Enter.
 
 Name . . . . . IKJEFT01
 Type . . . . . PROGRAM (i.e. PROGRAM, COPY, STAT, REPORT, etc...)
 Program Name . IKJEFT01 (Program for EXEC PGM=)
 APF . . . . . Y (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- The Create DD Statement panel is displayed. DEAE --------------------------- 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)
- In the Create DD Statement panel, enter the following information: - In the DD name field, type SYSTSPRT.
- In the Type field, type REPORT. - Create DD Statement with information entered DEAE --------------------------- 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. 
- Press END to save your changes and return to the DD Statement list panel, which now looks like this: DEAE ----------------------- 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 ********************************
 
- Press END to exit the DD Statement List panel and return to the Edit Services Properties panel.
- In the Create User Defined Service panel, select 2 (Syntax Template) in the Select Edit Option field.The Create Service Syntax panel is displayed.
- In the Create Service Syntax panel, enter the following information: - In the Syntax field, type DISPLAYDATABASE.
- In the DDName field, type SYSTSIN.The panel should appear as shown in the following figure. - Create Service Syntax DEAE -------------------------- Create Service Syntax -------------------------
 Command ===>
 
 Press Enter to continue updating syntax options.
 
 Service . . . . : IKJEFT01
 Syntax . . . . . . DISPLAYDATABASE
 Owner . . . . . . MVSNXL1
 DDName . . . . . . SYSTSIN
 
 Description . . .
- Press Enter to continue updating options and to include the syntax.
 - An editing panel is displayed. 
- 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(*)- The Service Syntax List panel appears. DEAE ---------- 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 ********************************
- Press END to return to Edit Services Properties.
- Press END to complete the User Defined Exception and return to Services Main Menu.
- Create an Action and associate the IKJEFT01 user defined service.For more information about associating, see Editing-Services-for-an-Action.
