x3270if - command interface to x3270, c3270 and s3270


SYNOPSIS

       x3270if [ -v ] action [ ( param [ ,... ] ) ]
       x3270if [ -v ] -s field
       x3270if -i


DESCRIPTION

       x3270if provides an interface between scripts and the 3270
       emulators x3270, c3270, and s3270.

       x3270if performs one of three functions.  In  action  mode
       (the  default),  it  passes  a  single action and optional
       parameters to the emulator for execution;  the  result  of
       the  command  is  written  to  standard output.  In status
       mode, it reports to standard output the value  of  one  of
       the emulator's status fields.  In iterative mode, it forms
       a continuous conduit between a script and the emulator.


OPTIONS

       -v     Turns on verbose debug messages, showing  the  lit­
              eral  data  that is passed between the emulator and
              x3270if.

       -s field
              Puts x3270if in status mode: it outputs  the  value
              of  an  emulator status field.  Field is an integer
              in the range 0 through 11.  The value 0 is a  no-op
              and  is  used only to return exit status indicating
              the state of the emulator.  The  indices  1-11  and
              meanings  of  each  field  are  documented  on  the
              x3270-script(1) manual page.

       -i     Puts  x3270if  in  iterative   mode.    Data   from
              x3270if's  standard  input  is copied to the emula­
              tor's script input; data from the emulator's script
              output  is  copied  to  x3270if's  standard output.
              x3270if runs until it detects  end-of-file  on  its
              standard  input or on the output from the emulator.
              (This mode exists primarily  to  give  expect(1)  a
              process  to  run,  on  systems which do not support
              bidirectional pipes.)


EXIT STATUS

       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 sta­
       tus  0  when  it  encounters  end-of-file.  If there is an
       operational error within x3270if itself, such  as  a  com­
       mand-line  syntax  error, missing environment variable, or
       an unexpectedly closed pipe, x3270if exits with status  2.

       x3270, c3270, and s3270 use a pair of pipes for communica­
       tion with each child process.   The  values  of  the  file
       descriptors  for  these  pipes  are encoded as text in two
       environment variables, which are required by x3270if:

       X3270OUTPUT
              Output from the emulator, input to the  child  pro­
              cess.

       X3270INPUT
              Input  to  the emulator, output from the child pro­
              cess.


SEE ALSO

       x3270(1), c3270(1), s3270(1), x3270-script(1)


COPYRIGHT

       Copyright 1999, 2000 by Paul Mattes.
              Permission to use,  copy,  modify,  and  distribute
              this software and its documentation for any purpose
              and without fee is hereby  granted,  provided  that
              the above copyright notice appear in all copies and
              that both that copyright notice and this permission
              notice appear in supporting documentation.


Man(1) output converted with man2html