Checks the status of the programmatic File Transfer.
File Transfer Library (libfxfer.a)
#include <fxfer.h>
cfxfer (sxfer)
struct fxs *sxfer;
%include fxfer.inc
%include fxhfile.inc
function pcfxfer (var Sxfer : fxs) : integer; external;
INTEGER FCFXFER
EXTERNAL FCFXFER
CHARACTER*XX SRC, DST, TIME
INTEGER BYTCNT, STAT
INTEGER ERRNO
RC = FCFXFER (SRC, DST, BYTCNT,
+ STAT, ERRNO, TIME, RC)
The cfxfer function returns the status of the file transfer request made by the fxfer function. This function must be called once for each file transfer request. The cfxfer function places the status in the structure specified by the sxfer parameter for C and Pascal. For FORTRAN, status is placed in each corresponding parameter.
Each individual file transfer and file transfer status completes the requests in the order the requests are made. If multiple asynchronous requests are made:
If the file transfer is run asynchronously and the cfxfer function is immediately called, the function returns a status not available -2 code. An application performing a file transfer should not call the cfxfer function until an error -1 or ready status 0 is returned. The application program can implement the status check in a FOR LOOP or a WHILE LOOP and wait for a -1 or 0 to occur.
sxfer | Specifies an fxs structure as defined in the fxfer.h file. The fxs C structure is:
struct fxs { int fxs_bytcnt; char *fxs_src; char *fxs_dst; char *fxs_ctime; int fxs_stat; int fxs_errno; } |
The cfxfer function returns the following:
0 | Ready status-success. The structure member fxs.fxs_stat contains status of fxfer function. |
-1 | Error status. Failure of cfxfer function. The fxs structure has NOT been set. |
1 | Status is not yet available. |
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.
For examples of using the cfxfer function see:
The cfxfer function is part of the Host Connection Program (HCON).
$HOME/fx_statxxxxxx | Temporary file used for status |
/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 structure |
/usr/include/fxconst.inc | Pascal file-transfer function constants |
/usr/include/fxhfile.inc | Pascal file-transfer invocation include file |
The fxfer command.
The fxfer function, g32_fxfer function.