## zowe › ca7 › commands › demand

The DEMAND command forces immediate scheduling of a job into the CA Workload Automation CA 7® Edition request queue.
Jobs that do not have definable processing cycles can be scheduled in this manner.
Demand scheduling can also be used to force an early execution of jobs that have defined processing cycles
or to schedule jobs for the first time, before they have been defined in the database.

#### Usage

zowe ca7 commands demand [options]

#### Required Options

- `--ca7Id` (string)

  - CA7ONL Instance

#### Options

- `--key` (string)

  - The command transaction key

- `--job` (string)

  - Defines the name xxx of the job being demanded.
    The demanded jobs are placed in the request queue and assigned a unique CA 7 job number.
    JOB and JOBL are mutually exclusive
    Limits:
    1 to 8 alphanumeric characters

- `--jobl` (string)

  - (Optional) Defines the long name of the job being demanded. The demanded jobs are placed in the request queue and assigned a unique CA 7 job number.
    JOB and JOBL are mutually exclusive
    Limits:
    1 to 64 alphanumeric characters

- `--arfset` (string)

  - (Optional)Defines the ARF set name that is used for this run of the job.
    you specify **NONE**, no ARF processing is performed for this run of the job
    Limits:
    1 to 4 alphanumeric characters

- `--cc` (string)

  - (Optional)Defines, with RO (relational operator), the job-level condition codes that are used to determine whether a job executes successfully.
    If specified, this value overrides the RO defined for the job in the CA WA CA 7 Edition database.
    RO is required when CC is specified
    Limits:
    1 to 4 numeric characters(0-4095)

- `--class` (string)

  - (Optional)Defines the workload balancing class for resource checking.
    Limits:
    1 alphanumeric character

- `--count` (string)

  - Defines the maximum number of times to repeat the job. COUNT is ignored if INTERVAL is not specified.
    If both COUNT and STOP are specified, the job stops repeating when the COUNT reaches zero or the STOP time is reached, whichever comes first.
    Default: None. The job continues repeating until the STOP time is reached
    Limits:
    1 to 4 numeric characters(0-1439)

- `--date` (string)

  - (Optional)Defines due-out and submit dates.
    Limits:
    If used, specify DOTM or TIME. +nn
    Defines the number of days after the current date.
    Limits:
    1 to 2 numeric characters from 1 to 99
    yyddd Defines the Julian date to run the job.

- `--depjob` (string)

  - (Optional)Defines a single predecessor job that must complete while the demanded job is waiting.
    Limits:
    1 to 8 alphanumeric characters

- `--dotm` (string)

  - (Optional)Defines the due-out time-of-day for the job in hours (hh) and minutes (mm).
    If omitted, the current time (when the DEMAND was processed) plus the lead time is assumed.
    If DOTM is specified on the DEMAND/DEMANDH command and the value that is given is earlier than the current time, the due-out day is assumed to be the following day.
    If DOTM and LEADTM are both omitted, then deadline start time is assumed to be the current time plus the LEADTM.
    Default: Current time, hhmm

- `--exec` (string)

  - (Optional)Specifies whether to execute the job (YES/NO).
    If NO (N) is used, the job does not run but shows a normal completion as if it did run.
    The value that is specified here overrides the value that is coded on the job definition EXEC field.
    Default: The job definition panel EXEC value if the job is defined to CA WA CA 7 Edition; otherwise YES,
    Values:YES|Y, NO|N

- `--interval` (string)

  - (Optional)Identifies that the job is repeated (executed more than once) and defines the amount of time between each iteration.
    If INTERVAL is specified, the TIME and TYPE keywords are required.
    If both INTERVAL and COUNT are specified, the INTERVAL value times the COUNT value must total less than 24 hours.
    For information about how the deadline, due-out, and submit times are calculated for repeating jobs, see the Usage Notes.
    Default: None. The job is not repeated.
    Limits:
    hh=1 through 2 numeric charact, hhmm

- `--jclid` (string)

  - (Optional)Defines the JCL data set that contains the execution JCL to be submitted.
    If used, the value must be a numeric INDEX associated with the wanted JCL data set (on the JCL statement in the initialization file).
    If the job is defined in the database, the value must be the same as the value on the DB.1 panel
    or the Optional PARMLIB/Parmlib value on the DB.10 and DB.11 panels.
    This field or the JCLLIB field is required if the job is not defined in the database.
    JCLID and JCLLIB are mutually exclusive.
    Note:
    Attempts to run cross-platform jobs that are not defined to the database fail because they are treated as regular CPU jobs when processed,

    Limits:
    1 to 3 numeric characters(1-999)

- `--jcllib` (string)

  - (Optional)Defines the JCL data set that contains the execution JCL to be submitted.
    If used, the value must be a symbolic INDEX associated with the wanted JCL data set (on the JCL statement in the initialization file).
    If the job is defined in the database, the value must be the same as the value on the DB.1 panel
    or the Optional PARMLIB/Parmlib value on the DB.10 and DB.11 panels.
    This field or the JCLID field is required if the job is not defined in the database. JCLID and JCLLIB are mutually exclusive.
    Note:
    Attempts to run cross-platform jobs that are not defined to the database fail because they are treated as regular CPU jobs when processed
    1 to 3 numeric characters from 0 through 254 and from 256 through 999. 255 is reserved.

- `--late` (string)

  - (Optional)Specifies whether a notification occurs when the job becomes late.
    Specify YES (Y) to make the job eligible to be marked LATE.
    If NO (N) is used, the job is never marked LATE.
    The value that is specified here overrides the value that is coded on the job definition PROMPTS field,
    Values:YES|Y, NO|N

- `--leadtm` (string)

  - (Optional)Defines the amount of elapsed time that is required to process the job.
    Indicates in hours (hh) and minutes (mm) the elapsed time.
    The maximum value that you can specify is 2400.
    Default: 1 hour
    Limits:
    hh= 1 through 2 numeric characters from 0 to 24
    mm= 2 numeric characters from 00 to 59

- `--mainid` (string)

  - (Optional)Specifies the MAINID, as defined in the initialization file CPU statement, to which you want to redirect the job.
    The value that is specified here overrides the value that is coded on the job definition MAINID field.
    Also, the SASSXX05 user exit does not override this value.
    The name must be one of the following values: ALL Specifies all CPUs are acceptable for executing the job. SYn n defines the CPU to which the job is being redirected. The value of n can range from 1 to 7. /SYn n defines a CPU to which the job cannot be submitted. The value of n can range from 1 to 7. -SYn n defines a CPU to which the job cannot be submitted. The value of n can range from 1 to 7.Limits:
    Invalid for internal cross-platform jobs.

- `--prty` (string)

  - (Optional)Defines the initial workload balancing priority,
    1-3 numeric (1-255)

- `--rms` (string)

  - (Optional)Specifies whether CA WA CA 7 Edition inserts the CA Workload Automation Restart_XXX Option for z/OS Schedulers RMS step.
    Specify YES (Y) to insert the step with the CA Workload Automation Restart_XXX Option for z/OS Schedulers processing code of P.Enter NO (N) to indicate do not insert of the RMS step.
    The value that is specified here overrides the value that is coded on the job definition INSERT-RMS field.
    Default: The job definition panel INSERT-RMS value if job defined to CA WA CA 7 Edition; otherwise NO.
    Limits:
    Invalid for internal cross-platform jobs
    , Values: YES|Y, NO|N

- `--ro` (string)

  - (Optional)Specifies the relational operator of the condition code (CC) or
    if the step level #SCC statements are being used in the JCL of the job.
    If specified, this RO overrides the RO defined for the job in the CA WA CA 7 Edition database.
    The following values are valid:
    EQ
    Equal to LT
    Less than GT
    Greater than GE
    Greater than or equal to LE
    Less than or equal to NE
    Not equal to #S
    Step condition code tests to be made based on a #SCC statement. IG
    No evaluation of the job is done.
    CA WA CA 7 Edition always assumes that the job completes successfully,
    regardless of condition codes, abend codes, or run-time JCL errors. 0
    No condition code test is made.Default:
    The job definition panel RO value if the job is defined to CA WA CA 7 Edition; otherwise 0.
    Limits:

    Invalid with agent jobs.

- `--schid` (string)

  - Defines the schedule ID within the job's total schedule definition to use for this run.
    If omitted, SCHID=1 is assumed unless the job exists in the CA WA CA 7 Edition database and has an associated schedule.
    In this case, the first SCHID defined in the schedule member is assumed.
    Default: 1,
    Limits:
    1 to 3 numeric characters from 1 to 999 (See Note)
    Note: If the SCHEDULE statement in the initialization file specifies SCHID=YES, this parameter is required.

- `--set` (string)

  - (Optional)Specifies skip the next scheduled cycle for the job (SKP),
    disable triggering (NTR), or bypass the database updating at the job completion.
    SKP
    Specifies this run of the job takes the place of the next scheduled run.
    This value has the same effect as entering NXTCYC,SET=SKP.
    It is reflected on output from LJOB and LLOCK commands as if NXTCYC,SET=SKP was used.
    This parameter is invalid if the job has no schedule.
    SET=SKP has no impact on repeating jobs that are already in the queues. NTR
    Specifies normal triggering is disabled only for this run of the job. NDB
    Allows a job to bypass all load processing at the job completion,
    but allows other processing to proceed typically.
    Note: Data set triggering is still in effect.
    , SKP|NTR|NDB

- `--stop` (string)

  - (Optional)Defines the clock time after which the job is not repeated.
    STOP is ignored if INTERVAL is not specified.
    If both COUNT and STOP are specified, the job stops repeating when either the COUNT reaches zero or the STOP time is reached, whichever comes first.
    If the STOP time is less than the submit time, the stop date is assumed to be the following day.
    Default:
    1439 minutes (24 hours minus 1 minute) after the submit time
    Limits:

    hh=1 through 2 numeric characters from 0 to 23
    mm=2 numeric characters from 00 to 59

- `--time` (string)

  - (Optional)Defines a submit time-of-day requirement for the job.
    If the format is used with a +, the submit time is calculated from the current time, adding the specified number of hours and minutes.
    If the + is used, the DATE keyword must be omitted.
    Limits:

    + is optional
    hh= 1 through 2 numeric characters from 0 to 23
    mm= 2 numeric characters from 00 to 59
    Required:

    No (unless DATE is used, if so, specify DOTM or TIME (hhmm format). Also required if TYPE=CLOCK is specified.

- `--type` (string)

  - (Optional)TYPE=RES specifies the job is being scheduled in restart/rerun status.
    TYPE=CLOCK, START, or END controls how the submit time requirement is calculated for repeating jobs.

    When TYPE=RES the job is put into the request queue with a restart requirement.
    The job is not submitted before the CA WA CA 7 Edition restart is done.
    The output networks are scheduled, but input requirements checking is bypassed.
    TYPE=CLOCK, START, or END is ignored if INTERVAL is not specified.
    With TYPE=CLOCK, the interval is added to the previous iteration's submit time requirement to determine the new submit time requirement.
    With TYPE=START and END the interval is added to the previous iteration's last (most recent) start and end time,
    respectively, to determine the new submit time requirement. TYPE is required when INTERVAL is specified.
    Limits:

    RES, CLOCK, START, or END

#### CA7 Connection Options

- `--host` | `-H` (string)

  - Host name of the CA7 API service that is running on the mainframe system.

- `--port` | `-P` (number)

  - Port for the CA7 API service that is running on the mainframe system.

- `--user` | `-u` (string)

  - User name for authenticating connections to the CA7 API service that is running on the mainframe system.

- `--password` | `--pass` | `--pw` (string)

  - Password for authenticating connections to the CA7 API service that is running on the mainframe system.

- `--base-path` | `--bp` (string)

  - The base path for your API mediation layer instance. Specify this option to prepend the base path to all resources when making REST requests. Do not specify this option if you are not using an API mediation layer.

- `--protocol` | `-o` (string)

  - Specifies protocol to use for CA7 connection (http or https).

    Allowed values: http, https

#### Profile Options

- `--ca7-profile` | `--ca7-p` (string)

  - The name of a (ca7) profile to load for this command execution.

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Base Connection Options

- `--reject-unauthorized` | `--ru` (boolean)

  - Reject self-signed certificates.

    Default value: true

- `--token-type` | `--tt` (string)

  - The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.

- `--token-value` | `--tv` (string)

  - The value of the token to pass to the API.

- `--cert-file` (local file path)

  - The file path to a certificate file to use for authentication.

    Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.

- `--cert-key-file` (local file path)

  - The file path to a certificate key file to use for authentication

#### Examples

- Demand job, PAYROLL to CA 7 on Instance1:

  - `zowe ca7 commands demand --ca7Id Instance1 --job PAYROLL`