Modify Post Processing Parameters

Use the xcompp script after a successful file transfer is received. The
XCOM Data Transport
parameters that appear in the script can also be used for any modifications that are needed..
Use the xcompp script after a successful file transfer is received. The
XCOM Data Transport
parameters that appear in the script can also be used for any modifications that are needed.
2
About xcompp
The xcompp script is a shell script that contains parameters for post processing of a file. After a successful file transfer is received, xcompp is always turned on (available) and will get invoked automatically. It is only invoked for incoming files and does not work for jobs or reports.
You can reference the parameters in xcompp by putting commands at the end of the script. If no modifications are made to the script, Xcompp does not take any visible actions.
Sample Script
#!/bin/sh # @(#)xcompp.sh 1.1 3/27/92 20:19:33 # This procedure is invoked by the CA XCOM Data Transport transaction # program after the transfer is finished # before the conversation is terminated. # 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/xcompp.out #exec 2>&1 #set -vx #PS4='[$0: $LINENO]+ ' #export PS4 ###### END OF DEBUG SECTION ###### compression=$1 # Compression flag shift notify_flag=$1 # Notify flag shift notify_name=$1 # Notify Name shift remoteuser=$1 # Notify User shift filetype=$1 # File type (Whether it's file, job or report) shift fileaction=$1 # File action (Create, replace or append) shift datasettype=$1 # Dataset type shift carriage_flag=$1 # Carriage return flag shift code_flag=$1 # Code flag shift recfm=$1 # Record format shift lrecl=$1 # Logical record length shift remote_reqno=$1 # Remote request Number shift local_reqno=$1 # Local Request number shift group=$1 # Group name shift sysdata=$1 # System Dependent User Data shift xferdata=$1 # Transfer Dependent User Data shift ident=$1 # Ident shift truncation_flag=$1 # Truncation flag shift tmp_file=$1 # Local temporary file name shift file=$1 # Local file name shift remote_file=$1 # Remote file name # POSTPROCESS HERE ! exit 0
Example
The following example shows how you change the permissions on a received file by adding the following snippet to the end of the xcompp script:
chmod 777 $tmp_file
This changes the permissions on tmp_file to read, write, and execute.
Type a $ sign before the variable to reference the variable in the xcompp script.