[ Previous | Next | Contents | Search ]
3270 Host Connection Program 2.1 and 1.3.3 for AIX: Guide and Reference

SEND FILE (90)

Purpose

Transfers a file from the workstation session where HLLAPI is running to a host session.

Prerequisite Calls

When calling the SEND FILE function, you must not currently:

Syntax

hllc (func, apistring, len, ret)
int *func;
char *apistring;
int *len;
int *ret;

Supplied Parameters

Supply the following parameters to invoke the SEND FILE function:

func Specifies the number of the function called; must be 90 for the SEND FILE function.
len Specifies the length of the data string. This parameter is overridden if in end of transmission (EOT) mode.
ret Does not apply for this function.
apistring Specifies the attributes of the API string; must be the same parameters that are used for the fxfer command. The data string must be between 1 and 255 bytes.

The following is the Data String for the supported parameters:

Option Description
-a Appends the file designated by the SourceFile parameters of the fxfer command to that designated by the DestFile parameter if the destination file exists. This flag is ignored and the destination file is created if the file designated by the Destfile parameter does not exist.
-n Specifies the short session name of a previously defined session. It is a single character in the range of a to z. Capital letters are treated as lowercase letters.
-r Specifies replacement of an existing file on the host system.
-t Performs EBCDIC to ASCII translation for a file. The country language to be used is defined by the -X option. This option assumes the file is a text file. The new-line character is the line delimiter.
-B Specifies the block size of the host data set. This option can only be used in an MVS environment.
-F Specifies fixed-length records.
-H Specifies the type of host environment; the values can be CMS, TSO, CICS, and VSE.
-I Specifies file transfer options placed directly within the IND$FILE command. This option also allows user comments placed within the file transfer command to the host; for example: -I "FILE=TS) This is a comment"
-L Specifies the logical record length. For new files, the default is 80. For variable-length records, 80 is the maximum record size. For CICS/VS or VSE/ESA environments, this option must be accompanied by the -F flag since these environments do not support logical record lengths. The combination of -F and -L flags causes the file to be padded with blanks to the end of the logical record length. The -L option is required if a record length is greater than the default record length of 80.
-S Specifies the amount of space to be allocated for a new data set in an MVS environment.
-T Performs EBCDIC to ASCII translation for a file to be stored in DOS format. The -U flag specifies record of undefined length. This option is only valid for MVS environment. The -V flag specifies record of variable length. This is the default. The flags -F, -t, or -T are not specified.
-X Specifies the AIX code set support for EBCDIC to ASCII translation. If this option is not specified, the code set specified by the system locale is used. The supported code sets are IBM-850, IBM-932, ISO8859-1, ISO8859-7, ISO8859-9, IBM-eucJP, IBM-eucKR, and IBM-eucTW.

Returned Parameters

ret The following codes are valid:
0 Specifies the file transfer was complete.
2 Specifies a parameter error occurred or you specified a data string length that was too short (0) or too long (more than 255 bytes) for the HLLAPI buffer. File transfer was unsuccessful.
11 Specifies the session is already connected; resource is not available.
200-368 Refer to Appendix A for file transfer error codes description.

Return codes 2 and 9 are returned if a problem occurred in the system or in the way you specified your data string.

Examples

The following are the examples of the data string used by the SEND FILE function call.

Remarks

The SEND FILE function transfers a file from the workstation session where HLLAPI is running to a host session. The interface parameter is a subset of the fxfer command supported by the AIX 3270 Host Connection Program (HCON). The file transfer process operates in synchronous mode. This function does support countries that require a double-byte character set (DBCS). The SEND FILE function can be called by a HLLAPI application program.

The SEND FILE function uses two sets of parameter options from the SET SESSION PARAMETERS (9) function:

If you are have already connected to the host session with the CONNECT PRESENTATION SPACE (1) function, you must disconnect by using the DISCONNECT PRESENTATION SPACE (2) function.

Related Information

CONNECT PRESENTATION SPACE (1) function, DISCONNECT PRESENTATION SPACE (2) function and SET SESSION PARAMETERS (9) function.


[ Previous | Next | Contents | Search ]