1X3270IF(1)                  General Commands Manual                 X3270IF(1)
2
3
4

NAME

6       x3270if - command interface to x3270, c3270 and s3270
7

SYNOPSIS

9       x3270if [option]... [ action ]
10       x3270if -i
11

DESCRIPTION

13       x3270if  provides  an  interface between scripts and the 3270 emulators
14       x3270, c3270, and s3270.
15
16       x3270if operates in one of two modes.  In action mode, it passes a sin‐
17       gle action and parameters to the emulator for execution.  The result of
18       the action is written to standard output,  along  with  the  (optional)
19       status  of  the  emulator.   (The  action  is optional as well, so that
20       x3270if can just reports the emulator status.)  In iterative  mode,  it
21       forms a continuous conduit between a script and the emulator.
22
23       The action takes the form:
24
25              action-name(param[,param]...)
26
27       The  parentheses  are manatory, and usually must be quoted when x3270if
28       is called from a shell script.
29
30       If any param contains a space or comma, it must be surrounded by double
31       quotes.
32

OPTIONS

34       -s field
35              Causes x3270if to write to stdout the value of one of the emula‐
36              tor status fields.  Field is an integer in the range  0  through
37              11.  The value 0 is a no-op and is used only to return exit sta‐
38              tus indicating the state of the emulator.  The indices 1-11  and
39              meanings  of  each  field  are documented on the x3270-script(1)
40              manual page.  If an action is  specified  as  well,  the  status
41              field  is written after the output of the action, separated by a
42              newline.  The -s option is mutually exclusive with the -S and -i
43              options.
44
45       -S     Causes x3270if to write to stdout the value of all of the emula‐
46              tor status fields.  If an action is specified as well, the  sta‐
47              tus fields are written after the output of the action, separated
48              by a newline.  The -S option is mutually exclusive with  the  -s
49              and -i options.
50
51       -i     Puts  x3270if  in  iterative mode.  Data from x3270if's standard
52              input is copied to the emulator's script input;  data  from  the
53              emulator's script output is copied to x3270if's standard output.
54              The -i option is mutually exclusive with the -s and -S  options.
55              x3270if  runs until it detects end-of-file on its standard input
56              or on the output from the emulator.  (This mode exists primarily
57              to give expect(1) a process to run, on systems which do not sup‐
58              port bidirectional pipes.)
59
60       -v     Turns on verbose debug messages, showing on stderr  the  literal
61              data that is passed between the emulator and x3270if.
62

EXIT STATUS

64       In  action  mode,  if the requested action succeeds, x3270if exits with
65       status 0.  If the action fails, x3270if exits with status 1.  In itera‐
66       tive  mode, x3270if exits with status 0 when it encounters end-of-file.
67       If there is an operational error within x3270if itself, such as a  com‐
68       mand-line  syntax  error, missing environment variable, or an unexpect‐
69       edly closed pipe, x3270if exits with status 2.
70

ENVIRONMENT

72       x3270, c3270, and s3270 use a pair of pipes for communication with each
73       child  process.  The values of the file descriptors for these pipes are
74       encoded as text in two environment variables,  which  are  required  by
75       x3270if:
76
77       X3270OUTPUT
78              Output from the emulator, input to the child process.
79
80       X3270INPUT
81              Input to the emulator, output from the child process.
82

SEE ALSO

84       x3270(1), c3270(1), s3270(1), x3270-script(1)
85
87       Copyright 1999, 2000, 2001, 2004 by Paul Mattes.
88              Permission  to  use,  copy, modify, and distribute this software
89              and its documentation for any purpose and without fee is  hereby
90              granted,  provided that the above copyright notice appear in all
91              copies and that both that copyright notice and  this  permission
92              notice appear in supporting documentation.
93
94
95
96                                 09 April 2005                      X3270IF(1)
Impressum