Products Services Download
  Support Contact Purchase
 

Delivering data   —   where and when you need it

Schema  > Products  > SRTransport  > Doc  > SRTransportES  > Status
 

SRTransportES Status

On completion, SRTransportES (srtransport) returns a status code that can be interpreted by your scripts or by a calling program (such as a scheduling application).

The status codes are:

  • 0 - The transport is complete. All rows were transported. No rows were rejected.
  • 1 - The transport couldn't start. In version 3.9 or earlier, it also might indicate that the transport is complete but that some rows were rejected.
  • 2 - The transport is incomplete/aborted. Not all rows were processed.
  • 3 - The transport is complete but some rows were rejected (version 4.0 and later).

Additionally, the processing 4gl code within the transport can terminate SRTransport with an application specific status code.

   run preprocessing:
   if xxx > 1000000
      exit 17

Here is an example of a shell script that handles srtransport's return status.

   #!/bin/sh
   srtransport -t abc.transport
   status=$?
   if [ $status = 2 ]; then
      echo "SRTransport: Transport incomplete."
      exit 2 # kill this script
   else if [ $status = 1 ]; then
      echo "SRTransport: some rows were rejected."
   else if [ $status = 17 ]; then
      echo "SRTransport: abort on business logic"
   fi
   # continue processing
Schema Research Corporation webmaster