How to submit a batch job from a CA-IDMS program?
search cancel

How to submit a batch job from a CA-IDMS program?

book

Article ID: 50883

calendar_today

Updated On:

Products

IDMS IDMS - Database IDMS - ADS

Issue/Introduction

Description:

This KD describes how to submit a batch job from a program (CA-ADS, cobol, assembler or PL/1) running in a CA-IDMS address space.

Solution:

The first step is to define a DD name for the internal reader in the CV startup JCL:

   //INTRDR DD SYSOUT=(A,INTRDR),DCB=(RECFM=F,LRECL=80,BLKSIZE=80)  

Then you must define a LINE/PTERM/LTERM combination of type SYSOUTL in the CA-IDMS Sysgen compiler:

   ADD LINE INTRDR   
   ENABLED   
   NOCOMPACT   
   PROTOCOL IS DEFRESP   
   TYPE IS SYSOUTL   
   DDNAME IS INTRDR   
   .   
   ADD PTERM INTRDR   
   ENABLED   
   IN LINE INTRDR   
   MAXIMUM ERRORS IS 3   
   READBUFFER   
   TYPE IS SYSOUTT   
   PAGE LENGTH IS 1   
   PAGE WIDTH IS 80   
   .   
   ADD LTERM INTRDR   
   ENABLED   
   PRINTER   
   NOBANNER   
   CLASS IS ( 64 )   
   CHECKPOINT IS OFF   
   CONTROL IS SYSTEM   
   PRIORITY IS 0   
      PTERM IS INTRDR
       . 

Note that the DDNAME in the line definition must match the DD name defined to the startup JCL above.

When the above is complete, reports written within CA-IDMS by CA-ADS, cobol, assembler or PL/1 and directed to the class specified in the LTERM above (in this case 64) will be submitted as batch jobs.

For example, in a CA-ADS dialog, the code would look like this:-

   MOVE '//JOBNAME JOB (111100000),CLASS=C,MSGCLASS=X,NOTIFY=username' TO WS-JCL-CARD.
       WRITE PRINTER FROM WS-JCL-LINE CLASS 64. 

Following that, each subsequent line of JCL should be MOVEd to WS-JCL-CARD and then a WRITE PRINTER performed for that line.

To complete the job, this should be performed:

   MOVE '/*EOF' TO WS-JCL-CARD.        
       WRITE PRINTER ENDRPT FROM WS-JCL-LINE CLASS 64. 

The same can be done in cobol, assembler and PL/1 with the appropriate coding commands for writing reports.

By default, CA-IDMS will attempt to insert the userid under which the CV is running on the jobcard. This function can be suppressed with optional functionality bit 52.

Environment

Release:
Component: IDMS