home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / HAPI.ZIP / HAPI / HAPI.DOC next >
Text File  |  1991-10-25  |  10KB  |  306 lines

  1.  
  2.  
  3.  
  4.            IBM Extended Services for OS/2 (c) Copyright International Business
  5.         Machines Corp., 1991
  6.  
  7.  
  8.  
  9.  
  10.         EHLLAPI SAMPLE PROGRAMS
  11.  
  12.         The EHLLAPI sample programs are a sample of writing application
  13.         programs using the EHLLAPI functions.  The sample programs are
  14.         designed to work in the OS/2 protect mode, with the Communications
  15.         Manager of the IBM Extended Services for OS/2.  Sample program
  16.         source code and the supporting files are provided for C, MASM,
  17.         COBOL, and BASIC Compiler languages.  Since the sample programs are
  18.         in source form, you will need to go through additional steps to run
  19.         these programs.
  20.  
  21.         The sample programs request EHLLAPI configuration information and
  22.         HOST session information.  The sample programs then attempt to send
  23.         the string "EHLLAPI" to one of the started sessions.  An EHLLAPI
  24.         search function will be called to search for the string.  Last, the
  25.         first 1920 characters of the host session screen will be displayed.
  26.  
  27.         Also provided on the sample program diskette is the Program Sampler
  28.         executable file.  This Program Sampler (HLLSAMP.EXE) lets you
  29.         experiment with various EHLLAPI functions.  See "Running the
  30.         Program Sampler" in the EHLLAPI Programming Guide.
  31.  
  32.         RESTRICTIONS
  33.  
  34.         1.  The Communications Manager must be loaded with at least one
  35.             3270 or one 5250 session started.  The 5250 session must not be
  36.             a printer session.
  37.  
  38.         PREREQUISITES
  39.  
  40.         To run a sample program, you must be familiar with the following
  41.         things:
  42.  
  43.         1.  OS/2 installation and command prompt
  44.  
  45.         2.  Communications Manager installation
  46.  
  47.         3.  Compiler for the desired language
  48.  
  49.         INSTALLATION
  50.  
  51.         Install OS/2 and Communications Manager according to instructions
  52.         in "IBM Extended Services for OS/2 Start Here".
  53.  
  54.         The compiler associated with the desired language also needs to be
  55.         installed using the installation procedure of that language
  56.         compiler.  Refer to the following language sections for additional
  57.         information.
  58.  
  59.  
  60.  
  61.                                                                                Page  1        
  62.  
  63.  
  64.  
  65.         SAMPLE EHLLAPI PROGRAMS
  66.  
  67.         1.  C LANGUAGE
  68.  
  69.             a.  INSTALL C COMPILER
  70.  
  71.             b.  C SAMPLE PROGRAM
  72.  
  73.                 The C sample EHLLAPI program is called HSMPLC.  Copy from
  74.                 the HAPI_C directory on the sample program diskette the
  75.                 files with the filename HSMPLC into a directory on your
  76.                 hard drive.  The files to be copied are source code (.C
  77.                 extension), module definition file (.DEF extension), make
  78.                 description file (no extension), and link response file
  79.                 (.LRF extension).
  80.  
  81.                 Copy HAPI_C.H from the Communications Manager directory
  82.                 (CMLIB) into the the directory containing the other include
  83.                 files.
  84.  
  85.                 Copy PHLLC_S.OBJ file from the Communications Manager
  86.                 directory (CMLIB) into the directory where other object
  87.                 files will be maintained.
  88.  
  89.             c.  LIBRARY FILES FOR C SAMPLE PROGRAM
  90.  
  91.                 Copy DOSCALLS.LIB from the OS/2 directory (OS2) into the
  92.                 compiler's library directory.
  93.  
  94.             d.  COMPILE/LINK C SAMPLE PROGRAM
  95.  
  96.                 Compile and link the sample EHLLAPI program according to
  97.                 your C compiler instructions.
  98.  
  99.         2.  MACRO ASSEMBLER
  100.  
  101.             a.  INSTALL MACRO ASSEMBLER
  102.  
  103.             b.  ASSEMBLER SAMPLE PROGRAM
  104.  
  105.                 The MASM sample EHLLAPI program is called HSMPLM.  Copy
  106.                 from the HAPI_M directory on the sample program diskette
  107.                 the files with the filename HSMPLM into a directory on your
  108.                 hard drive.  The files to be copied are source code (.ASM
  109.                 extension), module definition file (.DEF extension), make
  110.                 description file (no extension), and link response file
  111.                 (.LRF extension).
  112.  
  113.                 Copy HAPI_M.INC from the Communications Manager directory
  114.                 (CMLIB) into the the directory containing the other include
  115.                 files
  116.  
  117.                 Copy PHLLMASM.OBJ from the Communications Manager directory
  118.                 (CMLIB) into the directory where other object files will be
  119.                 maintained.
  120.  
  121.  
  122.                                                                                Page  2        
  123.  
  124.  
  125.  
  126.             c.  LIBRARY FILES FOR ASSEMBLER SAMPLE PROGRAM
  127.  
  128.                 Copy DOSCALLS.LIB from the OS/2 directory (OS2) into the
  129.                 compiler's library directory.
  130.  
  131.             d.  ASSEMBLE/LINK ASSEMBLER SAMPLE PROGRAM Assemble and link
  132.                 the sample EHLLAPI program according to your assembler
  133.                 instructions.
  134.  
  135.         3.  COBOL LANGUAGE
  136.  
  137.             a.  INSTALL COBOL COMPILER
  138.  
  139.             b.  COBOL SAMPLE PROGRAM
  140.  
  141.                 The COBOL sample EHLLAPI program is called HSMPLCBL.  Copy
  142.                 from the HAPI_CBL directory on the sample program diskette
  143.                 the files with the filename HSMPLCBL into a directory on
  144.                 your hard drive.  The files to be copied are source code
  145.                 (.CBL extension), module definition file (.DEF extension),
  146.                 link response file (.LRF extension) and the batch file
  147.                 (HSMPLCBB.CMD).
  148.  
  149.                 Copy HAPI_CBL.INC file from the Communications Manager
  150.                 directory (CMLIB) into the the directory containing the
  151.                 other include files.
  152.  
  153.                 Copy PHLLCOB.OBJ file from the Communications Manager
  154.                 directory (CMLIB) into the directory where other object
  155.                 files will be maintained.
  156.  
  157.             c.  LIBRARY FILES FOR COBOL SAMPLE PROGRAM
  158.  
  159.                 Copy DOSCALLS.LIB from the OS/2 directory (OS2) into the
  160.                 compiler's library directory.
  161.  
  162.             d.  COMPILE/LINK COBOL SAMPLE PROGRAM Compile and link the
  163.                 sample EHLLAPI program according to your Cobol compiler
  164.                 instructions.
  165.  
  166.         4.  BASIC LANGUAGE
  167.  
  168.             a.  INSTALL BASIC COMPILER
  169.  
  170.             b.  BASIC SAMPLE PROGRAM
  171.  
  172.                 The BASIC sample EHLLAPI program is called HSMPLBAS.  Copy
  173.                 from the HAPI_BAS directory on the sample program diskette
  174.                 the files with the filename HSMPLBAS into a directory on
  175.                 your hard drive.  The files to be copied are source code
  176.                 (.BAS extension), module definition file (.DEF extension),
  177.                 link response file (.LRF extension) and the batch file
  178.                 (HSMPLBSB.CMD).
  179.  
  180.  
  181.  
  182.  
  183.                                                                                Page  3        
  184.  
  185.  
  186.  
  187.                 Copy HAPI_BAS.INC file from the Communications Manager
  188.                 directory (CMLIB) into the the directory containing the
  189.                 other include files.
  190.  
  191.                 Copy PHLLCBAS.OBJ file from the Communications Manager
  192.                 directory (CMLIB) into the directory where other object
  193.                 files will be maintained.
  194.  
  195.             c.  LIBRARY FILES FOR BASIC SAMPLE PROGRAM
  196.  
  197.                 Copy DOSCALLS.LIB from the OS/2 directory (OS2) into the
  198.                 compiler's library directory.
  199.  
  200.             d.  COMPILE/LINK BASIC SAMPLE PROGRAM
  201.  
  202.                 Compile and link the sample EHLLAPI program according to
  203.                 your C compiler instructions.
  204.  
  205.         CONFIGURATION STEPS
  206.  
  207.         EHLLAPI supports the following connections of the Communications
  208.         Manager:
  209.  
  210.         1.  DFT 3270 terminal emulation
  211.  
  212.         2.  SDLC 3270 terminal emulation
  213.  
  214.         3.  IBM Token-Ring Network 3270 terminal emulation
  215.  
  216.         4.  X.25 3270 terminal emulation
  217.  
  218.         5.  IBM PC Network via Gateway 3270 terminal emulation
  219.  
  220.         6.  5250 Work Station Feature
  221.  
  222.  
  223.         For configuring and starting Communications Manager with the
  224.         terminal emulation connections above, refer to the "IBM Extended
  225.         Services for OS/2  User's Guide" and "IBM Extended Services for
  226.         OS/2 System Administrator's Guide for Communications".
  227.  
  228.         RUNNING EHLLAPI SAMPLE PROGRAMS
  229.  
  230.         Create a new directory SAMPLE on the PC where your EHLLAPI sample
  231.         program will reside.  Copy the executable (.EXE) created in the
  232.         above compile and link process to the SAMPLE subdirectory.
  233.  
  234.         From the "Communications Manager Main Menu", start the 3270
  235.         emulation feature.  Switch to an OS/2 screen group and change the
  236.         current directory to SAMPLE.  Execute the sample EHLLAPI program.
  237.         The sample program will prompt you to press ENTER at certain points
  238.         within the program execution.
  239.  
  240.         The functions which demonstrate the Structured Field process
  241.         requires the host file transfer file, IND$FILE, to be present on
  242.  
  243.  
  244.                                                                                Page  4        
  245.  
  246.  
  247.  
  248.         the host session.  The sample program will prompt the user to
  249.         verify this and allow him to continue by selecting "Y" or to stop
  250.         execution by selecting "N".
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.                                                                                Page  5        
  306.