An easy way to execute DCMT commands automatically at startup

Document ID : KB000015611
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

What is the easiest way to execute DCMT commands automatically at startup?

Answer:

A Startup Autotask can execute a program that calls RHDCMT00 to issue DCMT commands.

See https://docops.ca.com/ca-idms-ref/19/en/callable-services-reference/invoking-system-tasks-from-programs/invoking-dcmt-and-dcuf-commands-from-programs 

 

But the EASIEST way to execute a set of DCMT commands is to use an INOUTL LINE.

 

Example of sysgen definitions:

     ADD LINE SYSIO1                   

         ENABLED                       

         NOCOMPACT                     

         PROTOCOL IS DEFRESP           

         TYPE IS INOUTL                

         INPUT DDNAME IS SYSIN1        

         OUTPUT DDNAME IS SYSOUT1     

         .                              

 

     ADD PTERM SYSIOP1                 

         ENABLED                        

         IN LINE SYSIO1                

         MAXIMUM ERRORS IS 3            

         PRINTER CLASS IS 1             

         READBUFFER                     

         TYPE IS INOUTT                 

         PAGE LENGTH IS 24              

         .                              

DIS LTERM SYSIOL1 AS SYN.               

     ADD LTERM SYSIOL1                  

         ENABLED                        

         PRIORITY IS 0                  

         PTERM IS SYSIOP1               

         .                              

 

Then in the CV Startup JCL include the DD names defined in the LINE.

For Example:

 

//SYSIN1   DD DSN=YOUR.HLQ.SYSIN1.PDS(SYSIN1),DISP=SHR 

//SYSOUT1  DD SYSOUT=*                                          

 

The contents of  the SYSIN1 dataset in this example:

S USER1             

DCMT V SNAP TASK OFF  

BYE                   

 

In the IDMS LOG after the startup has completed I see the following messages:

 

IDMS DC258003 V1850 USER USER1 SIGNED ON LTERM SYSIOL2 AT 14:07:24.40 

IDMS DC260100 V1850 USER:USER1 DCMT      V SNAP TASK OFF              

IDMS DC278005 V1850 USER:USER1  TASK SNAP VARIED OFF (DISABLED)       

IDMS DC259001 V1850 USER USER1 SIGNED OFF LTERM SYSIOL2 AT 14:07:24.50

 

Note if the DCMT Task is unsecured and the DCMT commands you want to execute this way are not secured using #CTABGEN, then the signon is not necessary.  If either is secured the signon must be a valid user and password that holds the relevant privileges

Additional Information: