Skip to content

How to Use the Pre-allocation Script

Last update September 14, 2017

Contents

Use the xcompre exit to validate all locally and remotely initiated transfers before they begin, and to customize parameters for that transfer as indicated below. This exit is invoked by specifying the XPRECMD parameter in XCOM.GLB:

XPRECMD=%XCOM_HOME%\xcompre.bat

If XPRECMD is set when the XCOMD CA XCOM Scheduler service is invoked, the pre-allocation exit will be active for locally and remotely initiated transfers. This gives the system administrator additional capabilities to control access, such as allowing only a particular user to perform a transfer, or only allowing transfers to or from a particular directory.

Customization is useful where the remote user does not specify the true file name, and the local system uses a database to map the specified name to the true local name as in certain email applications. For example, an incoming transfer specifies a certain file name, but the administrator of the local system that is receiving the file wants to place the data into a different file, depending on the user ID of the sender. The script retrieves parameter values and sends the relevant information to standard output, and if desired, changes the values using the -p option.

xcompre

An xcompre sample script, xcompre.bat, located in your site’s installation directory, is provided with the installation of CA XCOM Data Transport for Windows (CA XCOM Data Transport). This optional exit is run on the local system before a transfer starts and can be tailored to meet individual user requirements. The xcompre exit passes transfer ID (tid) information to xcomqm, along with the parameter values specified by the available option -p.

Note: The -p option, as shown in the sample script, is intended only for use with the xcompre exit and is not supported with the xcomqm command line options.

The pre-allocation exit is invoked after CA XCOM Data Transport receives the CA XCOM Data Transport header from the partner, but before the transfer commences.

xcompre Option

The following is the available option for xcompre and its associated parameters:

  • -p
    Changes the values for the following parameters based upon the specified transfer ID (tid) and applies them to the transfer:
    • FILE_OPTION
    • LOCAL_FILE
    • REMOTE_FILE
    • CARRIAGE_CONTROL_CHARACTERS 
    • REMOVE_TRAIL_BLANKS

Sample XCOMPRE Script

The sample XCOMPRE script, xcompre.bat, is installed during the installation of CA XCOM Data Transport can be found in your site’s installation directory. In this sample script:

  • The only LOCAL file transfers permitted are ones that do not specify %XCOM_HOME%\config\xcom.reject.
  • The only REMOTE file transfers permitted are ones that do not have xcomv31 in USERID.

If %XCOM_HOME%\config\xcom.force is in the LOCAL_FILE, the -p option is used to specify the values to use for LOCAL_FILE, REMOTE_FILE, and FILE_OPTION.

Was this helpful?

Please log in to post comments.