Previous Page | Next Page

Batch Processing with the Result Manager (z/OS Only)

Customizing the JCL Program

The following sample JCL is found in SASHELP.QASSIST.BATCHJOB.SOURCE.

//&userid("Enter Userid","&sysjobid","8")A JOB (&userid,G001),
//        &userid, USER=&userid,
//            MSGLEVEL=(0,0),MSGCLASS=H
//***************************************************
//*** Sample JCL: SASHELP.QASSIST.BATCHJOB.SOURCE ***
//***************************************************
//SAS      EXEC SAS
//SYSIN    DD *

This JCL executes when you submit a batch job by typing L in the Cmd field next to an entry in the Result Manager window. The JCL opens the BATCH1 window, enabling the user to type information as prompted. You can customize the prompts in the BATCH1 window by customizing a copy of the JCL program as follows:

  1. If it is not already open, open the Result Manager window by following this selection path:Tasks [arrow] Results [arrow] Result Manager

  2. Type SASHELP.QASSIST in the Catalog field and press ENTER. A list of entries in the SASHELP.QASSIST catalog appears.

  3. Type B% in the Name field and press ENTER to display only those entries that start with the letter B.

  4. Type a C next to BATCHJOB SOURCE entry and press ENTER. The Copy window appears.

    Copy Window

    [Copy Window]

    Because you cannot edit entries in the SASHELP.QASSIST catalog, you must copy this entry to a location in which you have WRITE access. Later, you will change the Batch file User or Master/Group Profile option to point to the copy of the JCL program.
  5. In the Copy to field, type the name you want to assign to the copy and press TAB.

  6. In the Catalog field, type the name of the desired catalog (in which you have WRITE access) over the existing value.

  7. Select OK. The program is copied to the new location.

  8. In the Catalog field of the Result Manager window, type the name of the catalog in which the copy was placed and press ENTER.

  9. In the Cmd field for the copy of the program, type an E and press ENTER. The program appears in the Edit window.

You can use the prompt feature in your JCL in the same way as you would use the prompt feature in a query (see Using the Prompt Facility for more information). For example, if you want to prompt the user to change the TIME for the batch job, you would put in a prompt for the TIME in the JCL. In the following JCL, the third line creates an "Enter Time" prompt with an eight-character field that contains the default time of (,5).

//&userid("Enter Userid","&sysjobid","8")A JOB (&userid,G001),
//        &userid, USER=&userid,
//        TIME=&time("Enter Time","(,5)","8"),
//            MSGLEVEL=(0,0),MSGCLASS=H
//***************************************************
//*** Sample JCL: SASHELP.QASSIST.BATCHJOB.SOURCE ***
//***************************************************
//SAS      EXEC SAS
//SYSIN    DD *

In the edited code,

USER=

is the JCL parameter that is added to your JCL source code.

&userid

is the macro variable that contains the USER parameter value.

"Enter Userid","&sysjobid","8"

are the parameters that are used to build the statement displayed in the BATCH window.

"Enter Userid"

is the descriptive text displayed in the window.

"&sysjobid"

is the macro variable for system job ID. It provides the default value for the macro variable (& userid).

"8"

is the length, in bytes, of the userid macro variable field.

TIME=

is the JCL parameter that you want added to your JCL source code.

&time

is the macro variable that contains the TIME parameter value.

"Enter Time","(,5)","8")

is the parameter that contains the components that are used to build the statement displayed in the BATCH window.

"Enter Time"

is the descriptive text displayed in the window.

(,5)

is the default value for the macro variable &time .

"8"

is the length, in bytes, of the time macro variable field.

When you are done editing the JCL, select Close from the File menu. When prompted, select Yes to save the changes. Select Close from the File menu to exit the Result Manager.

To use the new JCL program, you must change the Batch file User Profile option as follows:

  1. Follow this selection path to open the User Profile window:Tasks [arrow] Setup [arrow] Profiles [arrow] UserIf you are an administrator and you want to set up this option for a group or for all users at a site, open the Master/Group Profile window instead of the User Profile window.

  2. In the Type field, type BATCH and press ENTER.

  3. For the Batch file option, change the value to the location of the new JCL program. Use a four-level name in the form libname.catalog.filename.type.

  4. If you have included prompts in the JCL, ensure that the Batch prompt option is set to YES. When the Batch prompt option is Yes, the batch file is scanned for prompts which start with ampersands (&). If the Batch prompt option is No, the batch file is submitted without being scanned for prompts. However, if you use ampersands in your JCL that are not intended to be prompts, make sure that the Batch prompt option is No. Otherwise, the ampersands are interpreted as prompts.

  5. Save you changes by selecting Close from the File menu.

The next time you submit a saved task for batch processing, the BATCH1 window appears with your changes.

Previous Page | Next Page | Top of Page