Initiates a file transfer from within a program.
File Transfer Library (libfxfer.a)
#include <fxfer.h>
fxfer ( xfer, sessionname)
struct fxc *xfer;
char *sessionname;
%include /usr/include/fxfer.inc
%include /usr/include/fxhfile.inc
%include /usr/include/fxconst.inc
function pfxfer
(var xfer : fxc; sessionname : stringptr) :
integer; external;
INTEGER FFXFER
EXTERNAL FFXFER
CHARACTER*XX SRCF, DSTF, LOGID, INPUTFLD, CODESET, SESSIONNAME
INT FLAGS, RECL, BLKSIZE, SPACE, INCR, UNIT, RC
RC = FFXFER ( SRCF, DSTF, LOGID, FLAGS, RECL, BLKSIZE,
+ SPACE, INCR, UNIT, INPUTFLD, CODESET, SESSIONNAME)
The fxfer function transfers a file from a specified source to a specified destination. The file transfer is accomplished as follows:
The fxfer function is part of the Host Connection Program (HCON).
The fxfer function requires one or more adapters used to connect to a host.
This function requires one of the following operating system environments be installed on the mainframe host: VM/SP CMS, VM/XA CMS, MVS/SP TSO/E, MVS/XA, TSO/E, CICS/VS, VSE/ESA, or VSE/SP.
This function requires that the System/370 Host-Supported File Transfer Program (IND$FILE or its equivalent) be installed on the mainframe host.
The file names are character strings. The local-system file names must be in operating system format. The host file names must conform to the host naming convention, which must be one of the following formats:
xfer | Specifies a pointer to the fxc structure defined in the fxfer.h file. |
sessionname | Points to the name of a session. The session profile for that session specifies the host connectivity to be used by the file transfer programming interface. The session name is a single character in the range of a through z. Capital letters are interpreted as lowercase letters. Session variables are defined in a HCON session profile. If the value of the sessionname parameter is set to a null value, the fxfer function assumes you are running in an e789 subshell. |
xfer | Specifies a record of fxc type within the fxfer.inc file. |
sessionname | Points to the name of a session. The session profile indicated by the sessionname parameter defines the host connectivity to be used by the file transfer programming interface. The session name is a single character in the range of a through z. Capital letters are interpreted as lowercase letters. Session variables are defined in an HCON session profile. If the sessionname parameter is set to char(0), the pfxfer function assumes you are running in an e789 subshell. |
SRCF = 'rtfile'//CHAR(0)
If the fxfer function is called synchronously, it returns a value of 0 when the transfer is completed. The application program can then issue a cfxfer function call to obtain the status of the file transfer.
If the fxfer function is called asynchronously, it returns 0. The application program can issue a cfxfer function call to determine when the file transfer is completed and to obtain the status of the file transfer. If the status cannot be reported by the cfxfer function due to an I/O error on the fx_statxxxxxx status file, the cfxfer function returns a -1. If the status is not ready, the cfxfer function returns a -2.
The fx_statxxxxxx status file contains the status of each file transfer request made by the application program. The fxfer function fills in the xxxxxx portion of the fx_stat file based on random letter generation and places the file in the $HOME directory.
$HOME/fx_statxxxxxx | Temporary file used for status information. |
/usr/lib/libfxfer.a | Library containing C, FORTRAN, and Pascal interface file-transfer functions. |
/usr/include/fxfer.h | |
C file-transfer include file with structures and definitions. | |
/usr/include/fxfer.inc | |
Pascal file-transfer include file with structures. | |
/usr/include/fxconst.inc | |
Pascal file-transfer function constants. | |
/usr/include/fxhfile.inc | |
Pascal file-transfer invocation include file. |
The file-transfer check status function is the cfxfer function.