Name

dcswait — Wait for a DCS request to complete.

Synopsis

dcswait [-project proj] [-max n] [-verbose] jobid

Description

The dcswait command is used to wait for a DCS request to complete processing. It is often used to wait for asynchronous msrcp(1NCAR) requests. The dcsjlog(1NCAR) command can then be used, if desired, to examine the exit status of the target job.

Note

The dcswait command will not wait for itself (which would cause it to wait forever), but will complain and exit immediately.

Options

-p[roject] proj

Supply proj as the project number for charging. Currently, no charging is done for DCS operations, so this option is a placeholder for when charging might be imposed.

-max n

Supply n as the maximum number of seconds to wait. If n is zero, dcswait will poll the status of the job, returning immediately. The default is to wait until the target job terminates.

-verbose

Also print a message describing the exit code. The default is to not print anything if the dcswait command itself does not encounter a problem.

Operands

jobid

The DCS job id for the target request. You can find the appropriate job id(s) with the dcsq(1NCAR) command, or it will be displayed on standard out by asynchronous msrcp(1NCAR) commands.

Examples

Example 5. Wait for a specific job.

dcswait 102345

Environment Variables

See Environment Variables section of the Command Behavior and Envrionment chapter for details.

Exit Status

The dcswait command will return 0 (zero) if the target job has completed. An exit code of 10 indicates the target job was not known to the DCS server. An exit code of 11 indicates the target job was found but has not yet completed, either because the dcswait request timed out or was in the polling mode (-max 0 was specified). All other non-zero exit codes indicate a problem with the execution of the dcswait request itself, and do not imply anything about the target job.

See Exit Status Codes section of the Command Behavior and Environment chapter for details.

See Also

dcsjlog(1NCAR), dcsq(1NCAR), msrcp(1NCAR)

Copyright

2008 University Corporation for Atmospheric Research, all rights reserved.