A file transfer request for an FT system can also be submitted from an application program. This function uses the OPENFT macro.
Description of the functions
This program interface has the following functions:
Calling the openFT commands (with the exception of FTHELP) with all the parameters which are also valid at the command interface (see previous chapter).
In order to call one of the above-mentioned commands the application uses the ASSEMBLER macro OPENFT. Via the LINK macro, FTNC calls the module NCOPY, which in turn sets up a connection to openFT, sends the command unchanged to openFT and waits for a message from it. After the message has been received from openFT, the connection is cleared down again.
Messages generated by this module or created by openFT are stored as text strings in a buffer to be provided by the application program. For details of the format of these messages, see the manual "openFT (z/OS) - Installation and Operation".
The application program then continues. A return code is supplied to the application program in register 15.
Messages from openFT are always passed to the application program in a buffer. Even if the application program is running under TSO, no output is made to the terminal.
With the aid of the LINK macro a search is made for the module NCOPY in the normal hierarchy of libraries in an IBM environment (TASKLIB, JOBLIB, link library). This module and the macro OPENFT are not designed to be reentrant. They can only be run in the address space below 16 Mb, but can process addresses below and above 16Mb.
Description of the interface
The ASSEMBLER macro OPENFT is provided for calling commands.
If an instance other than STD is to be used or if an SVC number other than 211 is used for the openFT subsystem, then the file<openft qualifier>.<inst>.CONN must be assigned at runtime via the DD name OPENFT. This file contains the connection data for openFT. The specifications in angle brackets stand for OPENFT QUALIFIER and the instance name of the instance that is to be used.
The following linkage conventions apply to these calls:
In an IBM environment, registers 0, 1, 13, 14 and 15 have specific meanings and should not be used by the application program in any other way.
Registers 0 and 1 are used by the above-mentioned macro for passing parameters.
In register 13 the application program must pass the address of a save area of 72 bytes, justified on a full word boundary. This save area must lie in the address space below 16 Mb.
Registers 14 and 15 are used by the above-mentioned macro for calling the module NCOPY. This module is loaded into the address space below 16 Mb.
When control is returned to the application program, register 15 contains a return code.
The commands to be executed by openFT are passed as "command strings", which must have exactly the same format as if the commands were being entered at the terminal (see the chapter “openFT commands”). The commands must be entered in uppercase letters.
Messages returned by openFT are always passed to the application program as text strings in a buffer provided by the application program. For details of the format of these messages see the manual "openFT (z/OS) - Installation and Operation".