Remote job submission
OptiConnect allows jobs to be submitted on the local system and started
as a batch job on the target system transparently. These jobs must be created
using the Submit Job (SBMJOB) or Submit Database Jobs (SBMDBJOB) command.
This transparency is achieved by replacing QCMD routing entry in a subsystem
description (SBSD) with an entry that will route the submitted job to the
remote system. The following is an example of how to configure job submission:
- Create a routing entry that calls QYYCROUT with two input parameters.
Note:
Routing entries do not allow program parameters. You will need to
create a program to call QYYCROUT and pass the parameters. It should look
like the following CL program example 'ROUTEPGM':
PGM
CALL PGM(QSOC/QYYCROUT) PARM(ddmfile libname)
ENDPGM
- Add a routing entry to a subsystem description (SBSD) and specify 'ROUTEPGM'
as the 'Program to Call'.
- Create or change a job description to specify the routing data that is
to be the compare value for the routing entry just added.
Note:
All jobs submitted with this job description will run on the remote system
by the QYYCROUT program.
- When the job is submitted, QYYCROUT is started. QYYCROUT then extracts
information from the DDM file passed in. This DDM file is not used after
this. The parameter for the DDM file should be:
- Device = QYCTSOC
- Mode = BATCHJOB
- LCLLOCNAME = *LOC
- REMOTE SYSTEM = target system name
- QYYCROUT creates a data queue and a DDM file in library QTEMP. It starts
a SOCAnnnnnn job and creates a data queue on the target system.
- QYYCROUT then retrieves job attributes, cancel severity, and local data
area (LDA). The job and local data area information get sent to the remote
data queue on the target system. The target system runs a program to receive
this information and changes the target job's attributes to match the source
job.
- QYYCROUT will extract information about inline data files and copy them
to QTEMP in the target job.
The job queue on the source system receives request data one command at
a time and runs each request on the target. After each command is run, the
target job returns an indication of whether or not cancel severity has been
exceeded. This allows QYYCROUT to decide if the job should be terminated.
Since commands are run one at a time, holding the job on the source system
will end command execution on the target system until released.
After all the requests have been received and run, and if message logging
is set to something other than *NOLIST, the target joblog is retrieved and
written to QPJOBLOG. The user data field is set to the target system name.
To route the spooled file back to the source system:
- Create a Remote Output queue by using the CRTOUTQ command.
- Specify the system name that you will be routing files to in the Remote
System parameter. This will allow you to supply information to the remaining
parameters.
- For the Remote Print Queue (RMTPRTQ) parameter, specify the output queue
to which the remote writer sends the spooled file.
- Issue the Start Remote Writer (STRRMTWTR) command on the target system.
See Figure 12 and Figure 13.
Figure 12. Remote Job Submission Source System
Figure 13. Remote Job Submission Target System