Batch Processing with the Result Manager (z/OS Only) |
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:
If it is not already open, open the Result Manager window by following this selection path:Tasks Results Result Manager
Type SASHELP.QASSIST in the Catalog field and press ENTER. A list of entries in the SASHELP.QASSIST catalog appears.
Type B% in the Name field and press ENTER to display only those entries that start with the letter B.
Type a C next to BATCHJOB SOURCE entry and press ENTER. The Copy window appears.
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.In the Copy to field, type the name you want to assign to the copy and press TAB.
In the Catalog field, type the name of the desired catalog (in which you have WRITE access) over the existing value.
In the Catalog field of the Result Manager window, type the name of the catalog in which the copy was placed and press ENTER.
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 *
is the macro variable that contains the USER parameter value.
are the parameters that are used to build the statement displayed in the BATCH window.
is the JCL parameter that you want added to your JCL source code.
is the macro variable that contains the TIME parameter value.
is the parameter that contains the components that are used to build the statement displayed in the BATCH window.
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:
Follow this selection path to open the User Profile window:Tasks Setup Profiles 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.
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.
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.
The next time you submit a saved task for batch processing, the BATCH1 window appears with your changes.
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.