Created On: 24 March 2011 Problem: How can I submit jobs to the Enterprise Server internal reader ? Resolution: The MicroFocus emulation of JES supports the IBM z/OS internal reader (INTRDR) for submitting batch jobs from within CICS or from a batch job, with certain restrictions. N.B. All job streams must be composed of records less than or equal to 80 characters. Records longer than this will either be ignored, cause JCL errors, or result in the job stream "disappearing" (i.e. it will not appear in any of the ES/JES spool queues). 1) Submitting one or more batch jobs from another batch job Any program can submit a batch job to the internal reader by writing the job stream to a DDname that is defined as follows: //ANYNAME DD SYSOUT=(*,INTRDR) The job stream can be defined in an external file, as records within the program that writes to the internal reader, or as instream data, provided that an alternative end-of-data delimiter is used, for example: //INSTREAM JOB 'Internal reader',CLASS=A,MSGCLASS=A //* //STEP01 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=*,HOLD=Y //SYSUT2 DD SYSOUT=(*,INTRDR) == Direct the output from IEBGENER to the internal reader //SYSIN DD DUMMY //SYSUT1 DD DATA,DLM='%%' == Specify the 2 characters to be used as an end-of-data delimiter //JOBSUB1 JOB 'via INTRDR',CLASS=A,MSGCLASS=A //STEP99 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=*,HOLD=Y //SYSUT2 DD SYSOUT=*,HOLD=Y //SYSUT1 DD * TEXT FROM JOBSUB1 //SYSIN DD DUMMY %% == This marks the end of the job stream to be submitted via INTRDR N.B. Although IBM JES supports the submission of multiple jobs using this method, each delimited by /*EOF , only one job may be submitted to ES/JES in this way - even if a /*EOF record is written between jobs, they will be treated as a single job by ES/JES, and will fail with a "duplicate job" error. If you are submitting jobs from within an application program, whether Cobol or PL/1, you can submit multiple jobs within a single execution, provided that you close and reopenn the file that points to the internal reader in between each individual job submission. 2) Submitting batch jobs from within CICS. Before you can submit jobs to the internal reader from within CICS, you must set up the necessary connections between CICS and ES/JES, as described in the documentation, by enabling SSTM. Enable subsytem support (SSTM) by setting the environment variable ES_SSTM_CICS to point to the SSTMCICS job file (e.g. ES_SSTM_CICS=C:\ESadmin\MyCICS\CICS.JCL) 2.1) Submission via a Transient Data Queue Prior to release 6.0 SP2, this was the only method of job submission from within CICS. Define a TDQ as the type "Internal Rdr", using the drop-down selection box, and submit your JCL, record by record, using the command EXEC CICS WRITEQ TD directed to that TDQ. Multiple jobs can be written to the queue, each delimited a record containing /*EOF in columns 1 to 5. To ensure that your jobstream does not get interleaved with another user's jobstream, access to the TDQ should be serialised using the CICS enqueue and dequeue facilities. 2.2) Submission via the Spool Queue From release 6.0 SP2 of Studio/Server Enterprise Edition, you can also send jobs to the internal reader using the CICS spool. Open the spool with the statement EXEC CICS SPOOLOPEN USERID('INTRDR') NODE('LOCAL'), and then use the SPOOLWRITE command to write your JCL statements, and SPOOLCLOSE to terminate the jobstream. CICS will handle the serialisation of the spool, but if a single transaction submits multiple jobs, it should close and reopen the spool between each job. Delimiting jobs by writing / *EOF , as described above, is optional. Incident #2503558 Old KB# 33752
↧