This section describes set-up for batch transactions, RJE, JCL and the Super Natural batch utilities.
This section covers the following topics:
You use batch processing to manage resources efficiently by processing large numbers of records and printing long reports at off-peak times.
In order to run transactions in Batch mode, you must have
either Natural PROCESS or NATRJE for your
environment. You maintain the control procedures for your system environment in
the Super Natural Administration application using
the JCL Members function which in turn accesses the Natural
LIST
command.
The Super Natural administrator must organize the following:
Setting Super Natural user options
Deciding which users should be able to create and run batch transactions
Writing JCL procedures
Maintaining JCL members
Deciding how batch jobs should be submitted
Security and other issues.
By default, each JCL is stored in library ZJCL.
JCL member names should have 1 to 8 characters.
A user can only have access to one JCL at a time. However, you may create several JCL members in the library ZJCL. You can change user access to JCL members as necessary in their user options.
Variable parameters which must be changed by the user before execution of the batch job can be defined using text strings as long as they do not coincide with the job control language. You can modify the system exit SPRJEU so that it can provide the control procedure with user variables.
Once a job has been submitted to run a Super Natural batch transaction, do not modify the transaction until after the job has been run. Modifying the transaction can either cause an error or incorrect resulting data. For example, if a user changes the transaction defaults to Run Mode: ONLINE between batch job submission and execution, the batch job will terminate with an error.
Notes:
ETID
parameters. For further information on
ETID
parameters, see your Natural
Security documentation.
To enable a user to run transactions in Batch mode
Assign the desired logical printer number for transactions in Batch mode.
Set the option JCL ID to determine which JCL member the user will use (default JCL01).
Set the appropriate user options for Report/Logging Destination to "Y".
The following Report/Logging Destinations are available for transactions in Batch mode:
PRINTER
WORK FILE
CON-NECT
USER FILE
Set the user option Run Mode: Batch to "Y".
Set the Natural PRINTER
parameter high enough
for the code generated by Super Natural to pass the
syntax checker in the online Natural session in which Super
Natural is running.
For example, if the report destination is logical printer number 8, PRINTER=8 (or higher) must be used. You can check the printer, work file and PC file numbers allocated using the Natural utility SYSDBA.
You can set the PRINTER
parameter in
the Natural parameter module or dynamically.
The user can now save and run batch transactions.
You can also authorize users to use certain user options (for example, non-descriptor criteria) only in Batch mode.
The RJE facility allows users to submit batch transactions from within Super Natural without having to write the JCL themselves.
To enable a user to submit batch jobs by RJE
Set the user's options as described in the section Setting Up Batch Processing earlier in this section.
Set the user option Batch Job Entry: RJE Available to "Y".
Code the JCL for the Natural batch job.
You can specify unique JCL members for each user, or more than one user for the same JCL. For further information, see JCL Members in Special Services for Batch Transactions.
Store JCL members as source members in the Natural library ZJCL.
To activate batch RJE, the user must set the transaction mode
Run Mode to "B" using the
MODES
command from within the transaction he wants
to submit.
Now the user can run transactions in Batch mode and the batch jobs will be automatically submitted.
JCL members for use with Super Natural RJE are written the same way as any Natural batch job for your site, except for the Super Natural special characters described below.
The following special characters are available when creating or modifying JCL members for the submission of batch transactions:
Super Natural inserts the correct
LOGON
and EX
commands
when the transaction is submitted to RJE.
The insert character ">" allows a JCL member to be used repeatedly by the same and multiple users without modification.
Example:
The following example shows how the insert
character ">" works. The insert character is used in the JCL for a
transaction named REPORT1 for the user
USERID as follows:
>
FIN
When the job is submitted, Super Natural inserts commands to change the instream data to the following:
LOGON SYSSN
EX IREPORT1 YUSERID
FIN
where I
is the program prefix for
transactions, and Y
is the private library
prefix.
The characters "*******" are replaced by the User ID at the time the transaction is submitted for execution. You can use this character string in the job card.
The characters "#######" are replaced by the transaction name when the transaction is submitted for execution as in the following example:
Example:
//******* JOB #######, MSGCLASS=X, CLASS=G
//NATBAT EXEC
The characters "pppppppp" are replaced by the active PSB name (DL/I files) at the time the transaction is submitted for execution (only for DL/I files).
For information on maintaining JCL members, see JCL Members in Special Services.
The Natural Security environment must be set up so that the startup program MENU is active when batch processing is invoked. MENU reads the Natural commands which follow as input data, and controls the execution of the transaction.
If there is not a control record for the transaction, batch processing is not started.
The control record is created from the online environment before batch processing is started. Batch transactions are registered with Super Natural.
Transactions which are not registered with Super Natural can only be run if they are in the private library of the user, in a public library the user can access or if the relevant library is defined under Natural Security and the transaction processing is started from that library.
Super Natural must be set up according to the instructions in the Setting up Super Natural documentation.
User Type Person
or
Administrator
.
If the user submitting the batch job is defined to Natural
Security as a user of the type
Person
or
Administrator
and AUTO=ON
is specified, the job name itself is used to perform the logon and the
Natural Security logon need not be coded in your
JCL. For further information, see Generating
User ID's in Dynamic Features.
User Type Member
If the user is defined as a user of the type
Member
, AUTO=ON
can still
be used if the default application for that user ID is SYSSN.
If the member's default application is not SYSSN, the Natural Security logon commands must be coded in the JCL as in the following example:
SYSSN, USERID
%*
PASSWORD
In Natural Security Version 2, define the
application SYSSN with RESTART=N
on the application profile. Restart data is not used in Super
Natural, and turning RESTART
off
will prevent a duplicate user ID from occurring.
If Natural Security is installed, use the insert character ">"as the Super Natural MENU program expects the execute card in a specific format. For further information on the insert character">", see Special Characters in Writing JCL Members.
If the RJE facility is being used to submit batch jobs from
Super Natural, use the insert character">" which
allows Super Natural to insert the
LOGON SYSSN
and EX IPGMNAME
YLIBRARY
commands. For further information on the insert
character ">", see Special
Characters in Writing JCL Members.
If you do not use the RJE facility (i.e., the JCL is to be submitted outside of Super Natural), you can code the Natural control statements in two ways.
If private libraries are not defined to Natural Security code the Natural control statements as follows:
LOGON SYSSN EX IPGMNAME YLIBRARY
If private libraries are defined to Natural Security code the Natural control statements as follows:
LOGON YLIBRARY EX IPGMNAME
If you do not use the insert character ">", and hard-code the control statements, the transaction name must consist of eight positions. If the name has less than eight characters, it must be padded to eight positions with trailing blanks. For example, if you want to run the transaction ITEST in library YSALZC, the following will result in an error under Natural Security:
LOGON SYSSN EX ITEST YSALZC
The correct version is as follows:
LOGON SYSSN EX ITESTblanks YSALZC
where blanks are three trailing blanks you must enter for the five-character ITEST transaction.
Super Natural generates the commands correctly when the insert character ">" is used. For further information on the insert character ">", see Special Characters in Writing JCL Members.
JCL members for external submission are coded the same way as any Natural batch jobs for your site.
To log on to SYSSN and execute the transaction from the user's private library, code the Natural control statements as follows:
LOGON SYSSN EX IPGMNAME YLIBRARY
To log on directly to the private library and execute the transaction, write the Natural control statements as follows:
LOGON YLIBRARY
EX IPGMNAME
Note:
Users of Natural Security should see
Notes for Natural Security
Users in Batch Processing.
To submit batch jobs using Natural PROCESS
Change the submission indicator in the Natural subprogram SPPARM from RJE to NPR.
Specify a process node ID.
For further information, see the SPPARM source.
The Natural subprogram SPRJEU is delivered in source form.
When Super Natural transactions are run in Batch mode, the subprogram SPRJEU is executed once for every job card prior to the submission of the job by NATRJE.
You can use NATRJE to add, modify and delete job cards. For further information, see the SPRJEU source.