Batch Online Management

Users can submit queries through online batch job execution using the Batch Execution panel or by normal batch job submission.
datacom
Users can submit queries through online batch job execution using the Batch Execution panel or by normal batch job submission.
 
 
Authorizing Users for Batch
Users must be authorized for batch submission by specifying 
Y
 (yes) in the SUBMIT ALLOWED field on the User Table Maintenance panel, accessed from the USERS option on the Administrative Menu. (See Authorizing Users in CA Dataquery.)
Using Batch Online
When a user submits a query from the online batch execution panel, 
CA Dataquery™ for CA Datacom®
 searches the 
CA Dataquery™ for CA Datacom®
 JCL library for the appropriate Batch Online JCL member. To use a specific JCL member, users can type a valid JCL name over the displayed value. A user's only access to JCL names is by having access to the JCL library (authorization) or by being told a JCL name. If a user knows a JCL name, he can use it automatically if he is authorized for Batch Online.
 
CA Dataquery™ for CA Datacom®
 will not allow users to input a JCL member name when they specify the system printer for the report destination. 
CA Dataquery™ for CA Datacom®
 searches the JCL library in the order described in the next section and uses the first JCL member which meets the criteria.
Understanding the System
End users can share JCL if:
  • A DQ PROC (a special DQ JCL member) is set up with a variable for the user's ID, or
  • The DQ JCL member contains the #DQOPERATORNAME variable so that the user's ID will replace the variable when the JCL is used. For more information on the #DQOPERATORNAME variable, see the next section.
 
CA Dataquery™ for CA Datacom®
 searches the JCL library in the following order for:
  • JCL member whose name matches the user ID
  • JCL member whose name matches the user's Group Level 3 ID
  • JCL member whose name matches the user's Group Level 2 ID
  • JCL member whose name matches the user's Group Level 1 ID
  • Default JCL member named $$DQJCL
When 
CA Dataquery™ for CA Datacom®
 finds a JCL member name that matches one of the above criteria, 
CA Dataquery™ for CA Datacom®
 supplies that value on the Batch Execution panel. When the Batch Execution panel (DQEN0) is used, the name of a JCL member appears on the panel. The name is selected according to the above criteria. The user may change the name to any valid JCL member or PROC name.
Sharing JCL
End users can share JCL if it contains the #DQOPERATORNAME variable ID so that when the user enters a valid JCL name, the #DQOPERATORNAME is automatically replaced by the user's ID. Only the first occurrence of #DQOPERATORNAME is replaced per line (80 byte card image). If replacing #DQOPERATORNAME in the JCL causes the line to go past column 71, the DQ506E error message is displayed and the JCL needs to be changed for the variable to be used.
An example for using the #DQOPERATORNAME variable is as follows:
  • The site has CA Top Secret external security on their system
  • The user signed on to CA Top Secret with a user's ID of TSS-USER
  • The user signed on to CICS with a user's ID of CICS-USER
  • When the user ran the following JCL, #DQOPERATORNAME was replaced with TSS-USER
An example for z/OS would be:
// jobname JOB (accounting information),MSGCLASS=X,CLASS=A, // USER=#DQOPERATORNAME,PWD=ABCD // EXEC PROC=procname // EXEC PGM=DQBATCH // SYSIN DD * /* DQ INPUT //
When these jobs run, everywhere #DQOPERATORNAME was found in the above JCL, it was replaced with the TSS userid of TSS-USER. Another way to accomplish this is to set up DQ PROC (special DQ JCL) members that allow substitution of several different variables.
An example for z/VSE would be:
* $$ JOB JNM=DQBATCH,.... // JOB #DQOPERATORNAME // ID USER=#DQOPERATORNAME,PWD=ABCD // EXEC PROC=procname * * #DQOPERATORNAME // EXEC DQBATCH /* DQ INPUT /* /& * $$ EOJ
 There is not a special DQ variable to obtain the password from TSS and pass it to the //ID statement in your JCL. In this case, the password had to be hardcoded. Another way to handle variable substitution is mentioned in the above z/OS example.
Using the System Default Member ($$DQJCL)
 
CA Dataquery™ for CA Datacom®
 requires that you name the system default JCL member for the online submission of a batch query $$DQJCL. No other default name is acceptable. The next sections provide sample $$DQJCL jobs. Use your Systems Programmer as the authority when creating user JCL members. The following $$DQJCL samples demonstrate the required statements for the $$DQJCL system default JCL.
 
Sample z/OS JCL
 
Following is a sample of a $$DQJCL job for z/OS.
//jobname
See
// EXEC PGM=DQBATCH //STEPLIB
See
//SYSPRINT DD SYSOUT=* Print Output //SYSUDUMP DD SYSOUT=* //SNAPER DD SYSOUT=* //SYSOUT DD SYSOUT=* //DQOUT DD ...
Code according to your site standards if using EXPORT, or
//DQFIXD DD ...
Code according to your site standards if using EXPORT
//SYSIN DD * Command input /* DQ INPUT
DQ INPUT is provided by the active member submitted by the user.
//
 
Sample z/VSE JCL
 
Following is a sample $$DQJCL member for z/VSE.
* $$ JOB ...
See
* $$ LST ... // JOB name // EXEC PROC=procname
Whether you use PROCs or LIBDEFs, see
// EXEC DQBATCH // DLBL DQOUTD
Code according to your site standards if using EXPORT, or
// TLBL DQOUTT Code according to your site standards if using EXPORT, or
// DLBL DQFIXD Code according to your site standards if using EXPORT, or
// TLBL DQFIXT
Code according to your site standards if using EXPORT
/* DQ INPUT
DQ INPUT is provided by the active member submitted by the user.
/* /& * $$ EOJ
Library Management
Maintaining the JCL library is an important 
CA Dataquery™ for CA Datacom®
 administrative job function. You use the JCL option on the Administrative Menu to perform the following tasks:
  • Viewing a listing of JCL members
  • Creating JCL members
  • Editing JCL members
  • Deleting JCL members
  • Adding new copies of JCL members to the JCL library
  • Establishing definitions for variables in a JCL procedure member
There is no limit to the number of JCL members that you can have in your JCL library. However, you need at least one member, named $$DQJCL, which is required as the system default JCL member.
The Submit panel allows entry of any JCL member name. $$DQJCL is used as a default only if no JCL member is found under the user's name or any of the user's groups. All JCL members are used to submit batch queries or print requests to the system offline batch printer. A JCL member is assigned to a user by naming it with the user's name or to a group of users by naming it with the group name.
Selecting a Batch Online JCL Member
When you select the JCL option from the Administrative Menu, or use the JCL command from the command line, 
CA Dataquery™ for CA Datacom®
 displays the DIRECTORY OF JCL MEMBERS panel as shown following.
 
DIRECTORY OF JCL MEMBERS (DQDS0)
 
=> Place the cursor on a name to delete or edit. Use PF3 to add JCL members ------------------------------------------------------------------------DQDS0 DATAQUERY: DIRECTORY OF JCL MEMBERS START WITH: _______________________________ START TYPE: P Proc or Jcl ----------------------------------------------------------------------------- USER NAME OR GROUP-ID | TYPE | DESCRIPTION ----------------------------------------------------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | -------------------------------------------------------------------------- ===> <PF1> HELP <PF2> RETURN <PF3> CREATE <PF4> EDIT <PF5> NOT USED <PF6> DELETE <PF7> BACKWARD <PF8> FORWARD <PF9> NOT USED <PF10> NOT USED <PF11> NOT USED <PF12> RIGHT
 
Action
 
The START WITH: field, located in the upper-left corner of this panel, is where you enter the full or partial name of the JCL where you want the listing to start. When you press Enter, 
CA Dataquery™ for CA Datacom®
 refreshes the Directory of JCL MEMBERS panel with the JCL that you specified on the first line of the listing. You can also page forward using <PF8> FORWARD, or backward using <PF7> BACKWARD until you reach the member that you want to view or edit. START TYPE tells if the START WITH is a JCL or PROC name (P is the default).
 
Panel Description
 
The following list describes each column of the Directory of JCL Members panel.
  •  
     USER NAME
    OR GROUP-ID
    Alphabetical listing of all existing JCL member names. Usually the JCL member is a user ID or group level ID.
  •  
     TYPE
    Date the named JCL member was last accessed.
  •  
     DESCRIPTION
    Description of this JCL member as described on the EDITOR panel when it was created.
 
PF Keys
 
The following list describes the PF keys on the DIRECTORY OF JCL MEMBERS panel.
 
Key
 
 
Objective
 
 
Result
 
CLEAR
Return to the Main
Menu
Return to the Main Menu
<PF1> HELP
Display HELP panel
 
CA Dataquery™ for CA Datacom®
 displays the HELP panel
<PF2> RETURN
Return to previous
panel
Previous panel or Main Menu is displayed
<PF3> CREATE
Create a new JCL
member
 
CA Dataquery™ for CA Datacom®
 displays the EDITOR panel
<PF4> EDIT
Modify a JCL member
Display that JCL member
<PF5> NOT USED
Not in use
<PF6> DELETE
Delete a JCL member
 
CA Dataquery™ for CA Datacom®
 removes that JCL member
<PF7>BACKWARD
Scroll to previous
screen of JCL
members, if any
Display previous JCL members, if any
<PF8> FORWARD
Scroll to next screen of JCL members, if any
Display more JCL members, if any
Creating or Editing a JCL Member
You must build the JCL members for the end users. If you have existing JCL, it is still functional if it meets the criteria discussed in this chapter.
Use your Systems Programmer as the authority when creating user JCL members.
 
Action
 
When you want to create a new Batch Online JCL member or edit an existing Batch Online JCL member, begin by selecting the JCL option from the Administrative Menu, or use the JCL statement from the statement line. When the DIRECTORY OF JCL MEMBERS panel appears, press <PF3> CREATE, to create a new member, or <PF4> EDIT, to modify an existing member. 
CA Dataquery™ for CA Datacom®
 displays the EDITOR panel with the TYPE field specified as JCL. A sample JCL EDITOR panel follows:
 
JCL EDITOR (DQD10)
 
=> ------------------------------------------------------------------------DQD10 DATAQUERY: EDITOR ----------------------------------------------------------------------------- NAME: TEMP TYPE: JCL DESCRIPTION: ____________________________________________________________ ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 02 03 04 05 06 .. =========================== B O T T O M ================================== ----------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> SAVE <PF5> PROC DEF <PF6> DELETE <PF7> BACKWARD <PF8> FORWARD <PF9> UPDATE <PF10> VALIDATE <PF11> RIGHT/LEFT <PF12> NOT USED
Use and operation of the 
CA Dataquery™ for CA Datacom®
 EDITOR is fully described.
 
CA Dataquery™ for CA Datacom®
 does not perform syntax checking on JCL statements. If errors are present in your JCL member, the submitted job does not execute properly. JCL errors are detected and reported by the operating system. Test JCL by submitting sample jobs.
Saving a JCL Member
When you create a new JCL member, you must press <PF4> SAVE to save that member in the JCL library. You cannot update or edit a new member until it has been saved. 
CA Dataquery™ for CA Datacom®
 does not know that that member exists until you save it.
Copying a JCL Member
To copy an existing member, select the JCL option from the Administrative Menu, or use the JCL statement from the statement line. When the DIRECTORY OF JCL MEMBERS appears, position the cursor on the member name and press <PF4> EDIT. When the member appears on the EDITOR panel, type the new member name over the old member name and press <PF4> SAVE. 
CA Dataquery™ for CA Datacom®
 redisplays the EDITOR panel with the new member stored on the JCL library. Edit the new member as needed.
Deleting a JCL Member
To delete a JCL member, begin by selecting the JCL option from the Administrative Menu or use the JCL command from the command line. When the DIRECTORY OF JCL MEMBERS panel appears, locate the cursor beside the JCL member that you wish to delete and press <PF6> DELETE.
Once you delete a JCL member, that member is deleted and cannot be restored or reaccessed. The entire member, including the variable definition for PROCs, is deleted.
Creating a JCL PROC for Online Submission
 
CA Dataquery™ for CA Datacom®
 provides a method of tailoring JCL at submission time. Special JCL members called PROCs, can be defined with substitutable variables. You can create JCL members that contain variables for which values can be substituted when the JCL is submitted. A PROC is to JCL what dialogs are to queries. The PROC variables are identified with dialog symbols and use dialog fill characters.
 
Comparison
 
The differences between PROCs and dialogs are:
  • You do not validate a PROC. You submit it using different values for the variables to test the validity of the PROC.
  • PROC variables must occur on the end of the line in the JCL if they contain a comma.
 
Uses
 
PROCs can serve a variety of functions. You may need to establish naming conventions at your site, or limit the execution of certain programs or use of data sets. Whatever the requirements are for your site, you can create one PROC with substitutable values for each one.
As you learn about 
CA Dataquery™ for CA Datacom®
 and create a few PROCs of your own, you will think of more uses for them. Since you can list valid values and specify ranges for numeric variables, you can make sure that only the values you authorize are used in your PROCs.
 
Before You Begin
 
It is advisable to create a working JCL member, save it, validate it and execute it before adding the variables and making it into a PROC. If errors occur after you make it into a PROC, it is easier to locate the problem.
A sample JCL member follows that is used as the basis of a PROC that changes the job name, user ID and password.
01 //jobname
Code according to site standards (See
). 01 //DQBATCH JOB (DAL-BO7,DQ110103),DQ,MSGCLASS=T, 02 // USER=DQUSER, 03 // PASSWORD=DQU 04 // EXEC PGM=DQBATCH 05 //STEPLIB
See
06 . 07 . 08 . 09 . 10 //SYSPRINT DD SYSOUT=*
Display the JCL member
To create a PROC from an existing public JCL member, begin by selecting the JCL option from the Administrative Menu or use the EDIT command to display the JCL member. 
CA Dataquery™ for CA Datacom®
 displays the EDITOR panel containing a copy of the JCL member, with the original name, type, status and description.
The EDITOR panel allows you to copy and modify an existing JCL member by assigning it a new name, type and description. You can modify any part of the JCL member shown.
Important Concepts
For more information about creating PROCs, see Creating Dialogs. You may also want to see the user instructions for responding to JCL PROCs in the same book. Creation and terminology for PROC creation is the same as for dialog creation. This section provides special information for PROCs only.
 
Variable
 
Designate any part of a JCL member a variable. The user submitting the JCL substitutes another value, such as a job name, DSN, or VOLSER, for the variable.
 
Default
 
A PROC variable must have a default value that the user can submit without changing the variable. The default variable can be blanks by using all dialog fill characters. Defaults must be acceptable to 
CA Dataquery™ for CA Datacom®
 without the variable ID.
 
Commas in JCL
 
If a JCL variable ends with a comma, the variable must be on the end of the line because a blank is required to indicate the end of the variable.
 
Save or Update
 
After you set up your variables in the JCL member, you should save the JCL member if you have not already, or update it if you have saved it previously.
PROC Example
The following panel shows how the variable IDs and fill characters for this PROC were inserted. (Select PROCESS MODE with <PF12> and press <PF4> SAVE to save the PROC.)
 
Sample PROC EDITOR Panel
 
=> ------------------------------------------------------------------------DQD10 DATAQUERY: EDITOR ----------------------------------------------------------------------------- NAME: SITEJCL________ TYPE: PROC__ DESCRIPTION: NEW COMPANY JCL ___ ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 //1?DQBATCH_ JOB (DAL-BO7,DQ110103),DQ,MSGCLASS=T, 02 // USER=2?USERID,____________ 03 // PASSWORD=3?PASSWORD 04 // EXEC PGM=DQBATCH 05 //STEPLIB DD DSN=datacom.products.loadlib 06 . 07 . 08 . 09 . 10 //SYSPRINT DD SYSOUT=* =========================== B O T T O M ================================== ----------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> DISPLAY COLUMNS<PF4> DISPLAY KEYS <PF5> DISPLAY ALL <PF6> LIST TABLES<PF7> BACKWARD <PF8> FORWARD <PF9> TEMPLATE <PF10> VALIDATE <PF11> RIGHT/LEFT <PF12> PROCESS MODE
The following list explains each entry/selection. These items are only examples and are not hardcoded.
  •  
     1?DQBATCH_
    Change the job name.
  •  
     2?USERID,_______
    Change the user ID.
  •  
     3?PASSWORD__
    Change the password.
  •  
     PROCESS MODE
    <PF4> SAVE
    Save the PROC definition so far.
Other Things You Could Do
You could make any other logical part of the JCL member a variable by adding variable IDs and where needed, dialog fill characters. You can use variables for:
  • Data set names
  • VOLSERs
  • Region size
  • Partition size
  • Program name to be executed
Removing JCL Members When Deleting a User
When you use a DELETE function to remove a user, the corresponding JCL members are also removed from the set of JCL members stored on the DQQ table. The user's authorization records stored on the 
CA Datacom® Datadictionary™
 are deleted as well. However the person entity-occurrence is not deleted. Consult with the administrator in charge of security about reassigning the JCL members before you delete a user.