Restrictions on CP and CMS Commands in Batch Jobs

The batch facility permits many CP and most CMS commands.

Note: If a batch job uses PIPE to issue a CP command, the batch machine will process the command. It will not restrict the execution.
The following CP commands are permitted and can be used to control the batch virtual machine:
CHANGE         MSG
CLOSE          QUERY
DEFINE         REWIND
DETACH         SMSG
DUMP           SPOOL
DISPLAY        STORE
LINK           TAG
LOADVFCB       
These CP commands are subject to the following restrictions in batch jobs.
  • CHANGE, CLOSE, and SPOOL cannot be used to affect devices RDR or 00C.
  • DETACH can not be used to affect devices RDR, PUN, PRT, 00C, 00D, or 00E.
  • Do not use the CHANGE, CLOSE, and SPOOL commands to affect the virtual reader.
  • Do not use the DETACH command to detach any spooling devices or the system, IPL, or 19E disks.
  • You must enter the LINK command on one line in the following format:
    CP LINK userid vaddr1 vaddr2 mode password
    You cannot use the LINK command keywords “To”, “As”, or “PASS=”.

    The userid cannot be “TO” or “T”. The vaddr2 cannot be “A”; you can use “0A”. The password cannot be “PASS=”.

    If the minidisk does not have a password associated with it, the password must be “ALL”.

    A maximum of 26 links can be in effect at any one time.

  • If a DIAGNOSE code X'08' is issued, the CHANGE and SPOOL commands will have an effect on the virtual card reader.
  • Preface all CP commands in a batch job with CP.
  • If you are running a CMS, EXEC 2, or REXX exec in the batch environment, the return code may be different than if the same exec is run in CMS. BATCH intercepts some commands and checks their validity for the CMSBATCH environment. The return code may be from BATCH and not from CP.
The following restrictions apply to CMS commands used in batch jobs:
  • Because the batch virtual machine reads input from its reader, do not use the following commands or operands that affect the reader:
    ASSGN SYSxxx READER (CMS/DOS only)
    DISK LOAD
    FILEDEF READER
    READCARD
    RECEIVE
  • Jobs running under the CMS batch machine should not use the RDCARD macro.
  • Do not use the following CMS SET command operands:
        AUTODUMP        LOADAREA
        AUTOREAD        OUTPUT
        BLIP            PROTECT
        IMESCAPE        REDTYPE
        IMPCP           RELPAGE
        INPUT           SERVER
        KEYPROTECT      STORECLR
    All of the other CMS SET command operands can be used in a job executing in the batch virtual machine. However, if the SET TRAPMSG command is invoked with the STOP option while in batch mode, the STOP option will be ignored.
  • Concatenation of commands by using the new line character (usually an X'15') results in an error message.