Startup autotask to execute a CLIST of DCMT commands?

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

Question:  

We would like to execute a CLIST of DCMT commands automatically at startup. Can this be done with a startup Autotask?

Answer:  

A startup Autotask is a non-terminal (background) and cannot be used to execute a CLIST. Calling (#LINK) RHDCCLST from an IDMSDC user program (See 17.0 CALLABLE SERVICES manual, 5.1 Invoking Command List Modules from Programs) sets up the user's LTERM for CLIST processing but the CLIST does not get executed until the user program returns to DC and the DC system is about to write ENTER NEXT TASK CODE to the user's terminal.
Since a Startup Autotask is not a terminal task, the CLIST will not be executed even if the Autotask user program has made the proper call to RHDCCLST.
What you can do:

  1. A startup Autotask can call RHDCMT00 directly to execute DCMT commands. See CALLABLE SERVICES manual, 5.2 Invoking DCMT and DCUF Commands from Programs.
  2. Define a LINE, PTERM and LTERM for LINE type INOUTL or S3270Q which can define an INPUT DD which is opened and read when the LINE is opened. This dataset can contain any task codes including DCMT commands. See SYSTEM GENERATION manual, 8.0 Teleprocessing Network Statements.