X3270IF(1) | General Commands Manual | X3270IF(1) |
x3270if - command interface to x3270, c3270 and s3270
x3270if [option]... [ action ]
x3270if -i
x3270if provides an interface between scripts and the 3270 emulators x3270, c3270 and s3270.
x3270if operates in one of two modes. In action mode, it passes a single action and parameters to the emulator for execution. The result of the action is written to standard output, along with the (optional) status of the emulator. (The action is optional as well, so that x3270if can just reports the emulator status.) In iterative mode, it forms a continuous conduit between a script and the emulator.
The action takes the form:
The parentheses are manatory, and usually must be quoted when x3270if is called from a shell script.
If any param contains a space or comma, it must be surrounded by double quotes.
In action mode, if the requested action succeeds, x3270if exits with status 0. If the action fails, x3270if exits with status 1. In iterative mode, x3270if exits with status 0 when it encounters end-of-file. If there is an operational error within x3270if itself, such as a command-line syntax error, missing environment variable, or an unexpectedly closed pipe, x3270if exits with status 2.
When a script is run as a child process of one of the emulators via the Script action, the emulator passes information about how to control it in environment variables.
On Unix, the emulator process creates a pair of pipes for communication with the child script process. The values of the file descriptors for these pipes are encoded as text in two environment variables:
When an emulator is started with the -scriptport option, the emulator will pass the scriptport port number encoded as text in the X3270PORT environment variable. x3270if will use that value as if it had been passed to it via the -t option. X3270PORT takes precedence over X3270OUTPUT and X3270INPUT.
Copyright 1999-2009, 2017 Paul Mattes.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY PAUL MATTES `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 December 2017 |