:PNLGRP. .*--------------------------------------------------------------------- .* Send Batch Command (SNDCMD) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD'.Send Batch Command - Help :P. The Send Batch Command (SNDCMD) command is executed in a 'source' job to specify one or more Control Language (CL) commands which should be executed in a different job (the 'target' job). :P. When the target job executes the commands, they are executed using the authority of the user who is running the target job :P. This enables the user executing the SNDCMD command to get information which is normally only available to the target job (such as details about objects in the target job's QTEMP library). :P. Any display commands (i.e. commands which would result in the screen changing) which are executed in the target job will result in the screen in THAT job changing. If the source job needs to see the contents of data in the target job, they must use the OUTPUT(*PRINT) or OUTPUT(*OUTFILE) option of the display command (where available) and subsequently view the printed output or output file. :P. :HP2.Restrictions: :EHP2.To run this command, the user must have job control (*JOBCTL) authority. Additionally, this command uses job servicing and debugging functionality, and will not function if either the target or source jobs are being debugged or serviced. :EHELP. .*--------------------------------------------------------------------- .* Target job name (JOB) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/JOB'.Target job name (JOB) - Help :XH3.Target job name (JOB) :P. Specifies the full qualified name of the target job in which the command should be executed (job-number/user-name/job-name). Unless one of the special values below is specified, all parts of the job name must be specified. :P. This is a required parameter :P. :PARML. :PT.:PK.qualified-target-job-name:EPK. :PD.Specify the full qualified name of the target job. :PT.:PK.*:EPK. :PD.The target job is the same as the source job. This option should only be used when testing commands. :PT.:PK.*SELECT or *S:EPK. :PD.A list of currently active jobs will be displayed, allowing the user to select one as the target job. :EPARML. :EHELP. .*--------------------------------------------------------------------- .* Command to execute (CMD) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/CMD'.Command to execute (CMD) - Help :XH3.Command to execute (CMD) :P. Specifies the command to be executed in the target job. :P. This parameter is a *CMDSTR allowing the command to be prompted and validated before execution. If you wish to include substitution variables in the command, use the RQSDTA parameter instead of the CMD parameter. :P. If EXECUTE(*YES) or EXECUTE(*NO) is specified, a value must be entered for this parameter or for the RQSDTA parameter. :EHELP. .*--------------------------------------------------------------------- .* Request 'data' or command (RQSDTA) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/RQSDTA'.Request 'data' or command (RQSDTA) - Help :XH3.Request 'data' or command (RQSDTA) :P. Specifies the command to be executed in the target job. :P. This parameter allows the command to be entered as a string including substitution variables. The details of the request will not be validated until runtime. :P. :PARML. :PT.:PK def.*CMD:EPK. :PD.Use the command specified in the CMD parameter. :PT.:PK.*SRC:EPK. :PD.The source file/member specified in the SRCFILE and SRCMBR parameters will be parsed to determine the commands to be executed in the target job. Commands in the specified source member can include certain substitution variables (see note below). :PT.:PK.request-string:EPK. :PD.Specify a command string (which can include certain substitution variables - see note below for valid substitution variables). :EPARML. :P. The following describes the valid substitution variables and the value returned for each list type: :PARML. :PT.:PK.&TJ:EPK. :PD.Target job name - the name of the target job. :PT.:PK.&TU:EPK. :PD.Target job user - the user of the target job. :PT.:PK.&TN:EPK. :PD.Target job number - the number of the target job. :PT.:PK.&SJ:EPK. :PD.Source job name - the name of the job which executed this command. :PT.:PK.&SU:EPK. :PD.Source job user - the user of the job which executed this command. :PT.:PK.&SN:EPK. :PD.Source job number - the number of the job which executed this command. :EPARML. :EHELP. .*--------------------------------------------------------------------- .* Log command (LOG) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/LOG'.Log command (LOG) - Help :XH3.Log command (LOG) :P. Specifies whether the command being executed should be logged in the job log of the target job. :P. :PARML. :PT.:PK def.*YES:EPK. :PD.The command should be logged in the job log of the target job. :PT.:PK.*NO:EPK. :PD.The command should not be logged in the job log of the target job. :EPARML. :NT. If LOG(*NO) is specified, even though the commands themselves will not be logged, there may be other related information or diagnostic messages that are logged, depending on the command being executed. :ENT. :EHELP. .*--------------------------------------------------------------------- .* Execute command (EXECUTE) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/EXECUTE'.Execute command (EXECUTE) - Help :XH3.Execute command (EXECUTE) :P. Specifies whether the command specified in the CMD or RQSDTA parameter (or the commands in the specified source member, if RQSDTA(*SRC) was specified) should be executed immediately in the target job. :P. If the source job wishes to execute multiple commands in the target job, they should execute this command multiple times specifying EXECUTE(*NO) and only specify EXECUTE(*YES) on the final command. This will result in the target job executing all the commands in the order in which they were entered in the source job. Alternatively, they can specify RQSDTA(*SRC) and specify a source member in the SRCFILE and SRCMBR parameters which contains one or more commands. :P. :PARML. :PT.:PK def.*YES:EPK. :PD.The command(s) should be executed immediately in the target job. :PT.:PK.*NO:EPK. :PD.The command will be stored and will only be executed in the target when this command is subsequently executed specifying EXECUTE(*YES). :EPARML. :EHELP. .*--------------------------------------------------------------------- .* Wait time for response (RSPTIM) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/RSPTIM'.Wait time for response (RSPTIM) - Help :XH3.Wait time for response (RSPTIM) :P. Specifies the length of time this job should wait for a completion response from the target job. A completion response is a message stating how many commands completed successfully and how many commands failed to complete successfully in the target job. :P. :PARML. :PT.:PK def.*NOWAIT:EPK. :PD.This job will not wait for a completion response from the target job, but will end as soon as the commands have been sent to the target job. :PT.:PK.*NOMAX:EPK. :PD.This job will wait forever for a completion response from the target job. :PT.:PK.wait-time:EPK. :PD.This job will wait for the specified number of seconds for a completion response from the target job. :EPARML. :NT. If no completion response is received from the target job within the specified wait time, a warning message will be displayed. Note that a lack of completion response does not necessarily mean that the sent commands were not executed in the target job, but possibly that they are simply taking longer to complete than the specified wait time. :ENT. :EHELP. .*--------------------------------------------------------------------- .* Allow error on command (ALWERR) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/ALWERR'.Allow error on command (ALWERR) - Help :XH3.Allow error on command (ALWERR) :P. Specifies the action that should be taken in the target job if the command does not execute correctly. :NT. If a command fails in the target job, then the error will normally be noted in the job log of the target job, whether or not LOG(*YES) is specified. :ENT. :P. :PARML. :PT.:PK def.*NO:EPK. :PD.Any subsequent commands which have been sent to the target job :HP1.will not:EHP1. be executed and all batch command processing in the target job will be ended immediately. :PT.:PK.*YES:EPK. :PD.Any subsequent commands which have been sent to the target job :HP1.will:EHP1. be executed. Batch command processing will contine in the target job until commands have been processed. :EPARML. :NT. If RQSDTA(*SRC) is specified, then individual commands in the source member can be specified with different ALWERR processing by including a comment as part of the command specifying either '**ALWERR' or '**NOALWERR' within the comment, e.g: :HP2.DMPOBJ QTEMP/MYUSRSPC *USRSPC /* **ALWERR */:EHP2. :ENT. :EHELP. .*--------------------------------------------------------------------- .* Source file (SRCFILE) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/SRCFILE'.Source file (SRCFILE) - Help :XH3.Source file (SRCFILE) :P. Specifies the name a of a source file that contains CL commands which should be run in the target job. This parameter is ignored unless RQSDTA(*SRC) is specified. :P. The possible library values are: :PARML. :PT.:PK def.*LIBL:EPK. :PD.The system searches the library list to find the library where the source file is located. :PT.:PK.*CURLIB:EPK. :PD.The current library will be used. If you have not specified a current library, QGPL will be used. :PT.:PK.library-name:EPK. :PD.Enter the name of the library where the source file is located. :EPARML. :EHELP. .*--------------------------------------------------------------------- .* Source member (SRCMBR) .*--------------------------------------------------------------------- :HELP NAME='SNDCMD/SRCMBR'.Source member (SRCMBR) - Help :XH3.Source member (SRCMBR) :P. Specifies the name of the member containing the CL commands to be executed in the target job. This parameter is ignored unless RQSDTA(*SRC) is specified. :PARML. :PT.:PK.*FIRST:EPK. :PD.The first member in the source file is used. :PT.:PK.member-name:EPK. :PD.Enter the name of the member which contains the CL commands. :EPARML. :EHELP. :EPNLGRP.