Previous Topic: About xcomend

Next Topic: How to Modify Printing Processes


Sample Script

The following is the sample xcomend script:

#!/bin/sh
# @(#)xcomend.sh     1.0     8/1/96 12:23:04

#   This procedure is invoked by the CA XCOM Data Transport transfer
#   program after the transfer is finished (whether successful or not).
#   Not every argument will be populated;
#   the values contained in the arguments depend on those provided by the
#   remote system.

###### START OF DEBUG SECTION ######
######
###### UNCOMMENT THE LINES BELOW TO DEBUG THIS SCRIPT ######
#exec > /tmp/xcomend.$1.out
#exec 2>&1
#set -vx
#PS4='[$0: $LINENO]+ '
#export PS4
###### END OF DEBUG SECTION ######

#
#  The first parameters are supplied for any type of transfer.

local_reqno=$1    # local request number/tid (000000 if unassigned)
shift
initiator=$1      # LOCAL or REMOTE
shift
transfer_type=$1  # FILE or JOB or REPORT
shift
direction=$1      # SEND or RECEIVE
shift
restarting=$1     # RESTARTING or FIRST_TRY
shift
start_time=$1     # Start time of transfer
shift
end_time=$1       # End time of transfer
shift
remote_system=$1  # Remote system name
shift
status=$1         # Status of transfer
shift
error=$1          # XCOM file transfer numeric error code
shift
msg=$1            # error code translated to message text
shift
status_msg=$1     # status message from partner when error on remote sys
shift

remoteuser=$1     # Remote user
shift

remote_reqno=$1   # Remote request Number
shift
group=$1          # Group name
shift
sysdata=$1        # System Dependent User Data
shift
xferdata=$1       # Transfer Dependent User Data
shift
transfer_name=$1  # Transfer Name
shift

tmp_file=$1       # Local temporary file name
shift
file=$1           # Local file name
shift
remote_file=$1    # Remote file name
shift

carriage_flag=$1  # Carriage return flag
shift
code_flag=$1      # Code flag
shift

compression=$1    # Compression flag
shift

file_recs=$1      # No. of records read/written
shift
file_bytes=$1     # No. of bytes   read/written
shift
blocks=$1         # No. of blocks  sent/received
shift
bytes=$1          # No. of bytes   sent/received
shift

#
#  The next parameters are supplied for file transfers only

if [ $transfer_type = "FILE" ]
then

fileaction=$1         # File action (C, R, or A for create, replace, or append)
shift
datasettype=$1        # Dataset type
shift
recfm=$1              # Record format
shift
lrecl=$1              # Logical record length
shift
truncation_flag=$1    # Truncation flag
shift

#
#  The next group of parameters are supplied for report transfers only

elif [ $transfer_type = "REPORT" ]

then

jobname=$1            # Job name field from JES
shift
jobnumber=$1          # Job number field from JES
shift
class=$1              # print class
shift
copies=$1             # Number of copies to print
shift
form=$1               # Type of form to print this job on.
shift
recfm=$1              # Record format of incoming print job.
shift
lrecl=$1              # Logical record length of incoming report.
shift
blksize=$1            # Block size of incoming report.
shift
ucs_name=$1           # Name of UCS to be used for this print job.
shift
fcb=$1                # Name of FCB (form control block) for this report.
shift
room_number=$1        # Room number field from JES.
shift
programmer_name=$1    # Programmer name field from JES.
shift
tso_notify=$1         # TSO notify field from JES.
shift
destination=$1        # Destination printer specification.
shift
carriagecontrol=$1    # Type of carriage control characters being used.
shift

#
# There are no extra parameters for remote jobs

fi

#
# PUT YOUR OWN XCOM ENDING CODE HERE !

exit 0