Examples of JOB

Example:

          GTM>JOB ^TEST:IMAGE="TEST1"
        

This creates a detached job that starts doing the routine ^TEST in the image TEST1.EXE in the current default directory. If ^TEST is not in the image TEST1 (or in the default image, if there were no IMAGE processparameter), GT.M attempts to auto-ZLINK the routine based on $ZROUTINES. GT.M initializes $ZROUTINES to the translation of the logical name GTM$ROUTINES, typically as defined in the login file (SYS$MANAGER:SYLOGIN.COM or SYS$LOGIN:LOGIN.COM) of the account.

Example:

          JOB PRINTLABELS(TYPE,PRNTR,WAITIM):(IMAGE="BACKGRND")
        

This passes three values (TYPE, PRNTR, and WAITIM) to the new job, which starts at the label PRINTLABELS of the current routine.

Example:

        SET j=prog_":(STARTUP="""_setup_""":PROCESS_NAME="""
        _pname_""")"
        JOB @(j_":30") ELSE WRITE !,"Print Daemon Already Started"
        

This JOB command uses indirection to handle variable job parameters. The new DETACHED process uses the same image as the process issuing the command. It executes the command procedure specified by the file-specification in the variable setup and uses the process name specified in the variable pname. The timeout of 30 seconds deals with the case where a job with the same name already exists for the VMS group of the user issuing the JOB.