SWAITCAT: Wait for the catalog value to reach a state

The SWAITCAT command enables a client to wait until a given transfer reaches a particular predefined phase, phasestep, or state before acting.

Command syntax: SWAITCAT

Task examples: SWAITCAT tasks

Alternatively, you can use the parameters WSTATES and WTIMEOUT to replace SWAITCAT functionality.

Command features

The SWAITCAT command enables you to perform the following functions:

  • Serialize transfers
  • Remotely control transfers using synchronous communication
  • Synchronize the termination of a collection of simultaneous transfers
  • Enhance script functioning

SWAITCAT uses synchronous communication for notification when a predefined phase, phasestep or state is reached. Or, conversely, it can notify CFTUTIL if the phase, phasestep, or state is not reached (K or H phasestep).

If the command fails, CFTUTIL sends the return code 8. The SWAITCAT command specific errors are:

  • SWAITCAT_FAILED: the transfer reached the K or H phasestep
  • SWAITCAT_TIMEOUT: the defined timeout was reached
  • SWAITCAT_NFOUND: no matching transfer was found
  • SWAITCAT_DELETED: the transfer was deleted
  • SWAITCAT_PARAM_ERROR: invalid parameter
  • SWAITCAT_TOO_MANY: too many transfers were selected (more than 2)

Syntax overview

SWAITCAT select=STRING*

Parameters

[ states=STRING ]

[ timeout=INTEGER ]

Expression

Select is a Boolean expression that identifies one transfer. It is a mandatory argument.

Syntax

CAT_ID OP VALUE

(CAT_ID OP VALUE)

CAT_ID OP VALUE && CAT_ID OP VALUE

CAT_ID OP VALUE || CAT_ID OP VALUE

Values

Possible values for CAT_ID:

  • IDTU
  • IDT
  • PART
  • PHASE (A, T, Y, Z, X)
  • PHASESTEP (D, C, H, K, X)
  • STATE   (D,C,T,X,H,K)
  • DIRECT  (RECV,SEND)
  • TYPE    (FILE,MESSAGE,REPLY)
  • MODE    (REQUESTER,SERVER)
  • IDF     
  • IDA
  • COMMENT

For OP:

  • == equal
  • != different
  • ~= match pattern (value with *,?)
  • /= doesn't match pattern
  • >  greater
  • <  lower
  • >= greater or equal
  • <= lower  or equal

VALUE: anything between double " or single ' quotes.

States

The states parameter is a string that can be composed of the T, X, Y, Z, N and A states. The default is "TX".

Possible values for the states parameter are:

  • T: the transfer is completed
  • TX: the transfer is completed or reached the X state
  • A: the transfer is acknowledged
  • TA: the transfer is completed and acknowledged
  • TXA: the transfer is completed and acknowledged, or the transfer reached the X state and is acknowledged
  • X: the transfer reached the X state
  • XA: the transfer reached the X state and is acknowledged
  • Y: the transfer reached post-processing phase
  • Z: the transfer reached acknowledged phase
  • N: the transfer is completed and received a negative acknowledgment

Timeout

Timeout is the maximum WAIT time in seconds. The default is approximately one year (365*24*3600 s).

Related Links