Checks the status of the programmatic File Transfer.
File Transfer Library (libfxfer.a)
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.
The cfxfer function is part of the Host Connection Program (HCON).
Item | Description |
---|---|
sxfer | Specifies an fxs structure as defined in the fxfer.h file.
The fxs C structure is:
|
Item | Description |
---|---|
Sfxfer | Specifies a record of type fxs as defined within the fxfer.inc file.
The Pascal fxs record format is:
|
Item | Description |
---|---|
fxc_bytcnt | Indicates the number of bytes transferred. |
fxc_src | Points to a static buffer containing the source file name. The static buffer is overwritten by each call. |
fxc_dst | Points to a static buffer containing the destination file name. The static buffer is overwritten by each call. |
fxs_ctime | Specifies the time the destination file is created relative to Greenwich Mean Time (GMT) midnight on January 1, 1970. |
fxs_stat | Specifies the status of the file transfer request. |
fxs_errno | Specifies the error number that results from an error in a system call. |
Item | Description |
---|---|
SRC | Specifies a character array of XX length containing the source file name. |
DST | Specifies a character array of XX length containing the destination file name. |
BYTCNT | Indicates the number of bytes transferred. |
STAT | Specifies the status of the file transfer request. |
ERRNO | Specifies the error number that results from an error in a system call. |
TIME | Specifies the time the destination file is created. |
The cfxfer function returns the following:
Value | Description |
---|---|
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.
Item | Description |
---|---|
$HOME/fx_statxxxxxx | Temporary file used for status |