home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / rexx / library2 / rexhlapi / rexhlapi.inf (.txt) < prev    next >
OS/2 Help File  |  1991-03-20  |  49KB  |  2,289 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. OS/2 REXHLAPI Dynamic Link Library Reference 
  5. Version 1.00
  6. (c) Copyright W. David Ashley 1991. All rights reserved.
  7. Program and Documentation by 
  8. W. David Ashley 
  9.  
  10. No warranties, guarantees, etc. are implied, and no liability is assumed for 
  11. the code, examples, DLLs, or documentation. 
  12.  
  13. This software is user-supported software and may be freely copied and used by 
  14. anyone who wishes to do so as long as the following conditions are met: 
  15.  
  16.   1. These functions may not be used by any program for which a fee is charged 
  17.      unless the owner of the program has paid the registration fee. 
  18.  
  19.   2. If you transmit a copy of this software to another party you must give 
  20.      them the complete unaltered contents of the REXHLAPI.ZIP file. 
  21.  
  22.   3. If you make any modifications to these functions you must change the name 
  23.      of the dynamic link library file REXHLAPI.DLL to some other name. 
  24.  
  25.  If you feel that this program has benefited you, please register it by sending 
  26.  $25.00 to: 
  27.  
  28.  W. David Ashley 
  29.  5 Timberline Dr. 
  30.  Trophy Club, Tx 76262 
  31.  
  32.  The source code for REXHLAPI can be obtained by sending $75.00 ($25.00 
  33.  registration + $50.00 source code) to the same address. 
  34.  
  35.  If you have questions, comments or suggestions please contact me through the 
  36.  OS/2 Shareware BBS or at the address above. 
  37.  
  38.  DESCRIPTION 
  39.  
  40.  This document is intended for application developers who wish to use EHLLAPI 
  41.  services from OS/2 REXX cmds. The EHLLAPI services are available in REXX as an 
  42.  external function package, and are loaded only when used. 
  43.  
  44.  A general understanding of the available EHLLAPI services to Communications 
  45.  Manager by the reader is assumed by the author. For more information on the 
  46.  specific services available in EHLLAPI refer to the IBM Operating System/2 
  47.  Extended Edition Version 1.2 EHLLAPI Programming Reference manual. 
  48.  
  49.  BEFORE YOU BEGIN 
  50.  
  51.  Before you begin to use this reference, it would be helpful to understand how 
  52.  you can: 
  53.  
  54.  o Expand the Contents window to see all available topics 
  55.  o Obtain additional information for a highlighted word or phrase 
  56.  o Use action bar choices. 
  57.  
  58.  HOW TO USE THE CONTENTS 
  59.  
  60.  When the Contents window is first displayed, some topics have a plus (+) sign 
  61.  beside them.  The plus sign indicates that additional topics are available. 
  62.  
  63.  To expand the Contents window if you are using a mouse, click on the plus 
  64.  sign. If you are using the keyboard, use the Up Arrow () or Down Arrow () 
  65.  key to highlight the topic and press the Plus (+) key.  For example, 
  66.  Introduction has a plus sign beside it. To see the complete list of topics, 
  67.  click on the plus sign or highlight that topic and press the Plus key. 
  68.  
  69.  To view  a topic, double-click on the topic (or press the Up Arrow or Down 
  70.  Arrow key to highlight the topic and then press the Enter key). 
  71.  
  72.  HOW TO OBTAIN ADDITIONAL INFORMATION 
  73.  
  74.  After you select a topic, the information for that topic is displayed in a 
  75.  window.  Highlighted words or phrases indicate that additional information is 
  76.  available. You will notice that certain words in the following section are 
  77.  highlighted. If you are using a mouse, double-click on the highlighted word. 
  78.  If you are using a keyboard, press the Tab key to move to the highlighted word 
  79.  and then press the Enter key. Additional information will be displayed in a 
  80.  pop-up window. 
  81.  
  82.  HOW TO USE ACTION BAR CHOICES 
  83.  
  84.  A number of choices are available for managing information presented in the 
  85.  OS/2 LAN Command Reference. If you want to see more information about these 
  86.  choices, double-click on the name of the choice (or press the Tab key to move 
  87.  to the choice and press the Enter key). 
  88.  
  89.  Bookmark    Allows you to set a placeholder so you can retrieve information of 
  90.              interest to you. (This choice is available from the Services 
  91.              pull-down.) 
  92.  
  93.  Search      Allows you to find occurrences of a word or phrase in the current 
  94.              topic, selected topics, or all topics.  (This choice is available 
  95.              from the Services pull-down.) 
  96.  
  97.  Print       Allows you to print one or more topics. (This choice is available 
  98.              from the Services pull-down.) 
  99.  
  100.  Copy        Allows you to copy a topic you are viewing to a file you can edit. 
  101.              (This choice is available from the Services pull-down.) 
  102.  
  103.  Options     Allows you to change the way your Contents window is displayed. 
  104.  
  105.  TRADEMARKS 
  106.  
  107.  The following trademarks apply to this reference: 
  108.  
  109.  o IBM is a registered trademark of International Business Machines 
  110.    Corporation. 
  111.  
  112.  o Operating System/2 and OS/2 are trademarks of International Business 
  113.    Machines Corporation. 
  114.  
  115.  o Personal System/2 and PS/2 are trademarks of International Business Machines 
  116.    Corporation. 
  117.  
  118.  o REXX/2 is a trademark of International Business Machines Corporation. 
  119.  
  120.  
  121. ΓòÉΓòÉΓòÉ 1.1. Requirements ΓòÉΓòÉΓòÉ
  122.  
  123. REXHALPI requires the following environment 
  124.  
  125.  o OS.2 1.2 Extended Edition or later 
  126.  
  127.  
  128. ΓòÉΓòÉΓòÉ 1.2. Installation ΓòÉΓòÉΓòÉ
  129.  
  130. Copy REXHLAPI.DLL to a directory specified in your LIBPATH. 
  131.  
  132. Note:  If you have a previous copy of REXHLAPI loaded and OS/2 cannot 
  133. open/replace the file then a copy of the DLL currently resides in memory. 
  134. Reboot and before executing any REXX cmds that reference REXHLAPI copy the file 
  135. to your LIBPATH destination. 
  136.  
  137.  
  138. ΓòÉΓòÉΓòÉ 1.3. Usage ΓòÉΓòÉΓòÉ
  139.  
  140. Add the following lines to all application cmds to insure the function is 
  141. registered. 
  142.  
  143. if RxFuncQuery('rexhllapi') then ,
  144.  call RxFuncAdd 'rexhllapi', 'rexhlapi', 'rexhllapi'
  145.  
  146. The above example would add the REXHLLAPI function so that it can be used. The 
  147. first argument specifies how you wish to refer to the function in your program 
  148. (its name in the program). The second argument references the name of the 
  149. REXHLAPI.DLL library (always 'REXHLAPI'). And the third argument references the 
  150. name of the entry point in the library which contains the code for the function 
  151. referenced in the first argument (always 'REXHLLAPI'). 
  152.  
  153. To drop the function when the application is done execute the following. 
  154.  
  155. call RxFuncDrop 'rexhllapi'
  156.  
  157. The function name now becomes unknown to the interpreter and will generate a 
  158. runtime error if used after this point in the program. 
  159.  
  160. Refer to IBM Operating System/2 Procedures Language 2/REXX Reference manual for 
  161. more information on the RxFuncAdd and RxFuncDrop statements. 
  162.  
  163. Note:  The case of the strings passed to RxFuncAdd and RxFuncDrop is not 
  164. important. The string will be converted to all upper case by the REXX 
  165. interpreter automatically. 
  166.  
  167.  
  168. ΓòÉΓòÉΓòÉ 2. How to Read the Syntax Diagrams ΓòÉΓòÉΓòÉ
  169.  
  170. The syntax diagram shows you how to specify a function so that REXX/2 can 
  171. correctly interpret what you type. Read the syntax diagram from left to right 
  172. and from top to bottom, starting at the ΓöÇ symbol, following the horizontal 
  173. line (the main path). A line ending with an ΓöÇ means that the command syntax is 
  174. continued.  A line starting with an ΓöÇ means that the syntax is continued from 
  175. the previous line. The ΓöÇ symbol marks the end of the function syntax. 
  176. Required parameters are displayed on the main path; optional parameters are 
  177. displayed below it. 
  178.  
  179. Parameters are classified as constants or variables. String constants must be 
  180. delimited by the standard REXX/2 quotation marks. A function name is a keyword. 
  181. REXX/2 functions may be either CALLed or referenced as a function entry. Some 
  182. of the external functions presented here do not return any values. 
  183.  
  184. Variables appear in lowercase letters and represet names or values you supply. 
  185. Include all punctuation shown in the diagram, such as colons, semicolons, 
  186. commas, quotation marks, and equal signs. 
  187.  
  188. Example: 
  189.  
  190.  
  191.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Change_Window_Name', nameparmΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  192.  
  193.  
  194. ΓòÉΓòÉΓòÉ 3. Functions Overview ΓòÉΓòÉΓòÉ
  195.  
  196. The EHLLAPI function package provides a single function name to be used with a 
  197. set of parameters. 
  198.  
  199. The general format of the EHLLAPI function invocation is: 
  200.  
  201. retval = REXHLLAPI(function-string [, parameters]);
  202.                       or
  203. call REXHLLAPI function-string [, parameters];
  204.  
  205. The function-string determines the EHLLAPI function to be invoked. The case of 
  206. the function-string is not significant but the case of all parameters are used 
  207. by the function package as they are passed to it. The number of parameters is 
  208. dependent on the EHLLAPI function to be invoked. 
  209.  
  210. Generally the data returned by a function is the return code generated by the 
  211. coresponding EHLLAPI function of the same name or a data string returned by the 
  212. specified function. In all cases if the function package determines an error in 
  213. the number of parameters or some other general error then the specified 
  214. function is not performed and the null string ('') is returned. 
  215.  
  216. In addition, the REXX variable HLLAPIRETC is also set by the REXHLAPI function 
  217. package. The combination of the returned data string and the contents of the 
  218. REXX variable HLLAPIRETC provide a clear mechanism in determining the results 
  219. of the execution of any of the EHLLAPI functions. The following outlines all 
  220. the possible combinations and their meaning: 
  221.  
  222.  o If both the returned data and the HLLAPIRETC variable are the null string 
  223.    ('') then there was an error detected in the number of input argument(s) to 
  224.    the function or their contents. 
  225.  
  226.  o If the HLLAPIRETC is the null string and the returned data is not the null 
  227.    string then the returned data should be ignored because the specified 
  228.    EHLLAPI function was not performed. The only exception to this rule is the 
  229.    Get_RexHLLAPI_Ver service because it does not execute an EHLLAPI function. 
  230.  
  231.  o If the returned data is not the null string and it is equal to the 
  232.    HLLAPIRETC variable then the specified EHLLAPI function was executed and the 
  233.    return code from that function has been returned in the returned data. 
  234.  
  235.  o In all other cases the specified EHLLAPI function will have been executed 
  236.    and data from that function is returned. The return code from the function 
  237.    will be set in the HLLAPIRETC variable. 
  238.  
  239.  The function-strings, parameters and returned data follow in alphabetical 
  240.  order. 
  241.  
  242.  
  243. ΓòÉΓòÉΓòÉ 3.1. Change_Window_Name (Service 106) ΓòÉΓòÉΓòÉ
  244.  
  245. Syntax: 
  246.  
  247.  
  248.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Change_Window_Name', nameparmΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  249.  
  250. Purpose: 
  251.  
  252. Changes the presentation space window name to the specified new name. The old 
  253. name is saved by the system and is restored on a call to the Disconnect_PS 
  254. service or changed on a subsequent call to the Change_Window_Name service. 
  255.  
  256. Prerequisite Calls: 
  257.  
  258. Connect_Window_Srvcs service 
  259.  
  260. Arguments: 
  261.  
  262.  argument 1     The string constant or a variable whose contents are 
  263.                 'Change_Window_Name'. 
  264.  
  265.  nameparm       A string of the form: 
  266.  
  267.     o 1 byte short session name 
  268.     o 1 byte change option 
  269.  
  270.        - A x'01' for changing the presentation space name 
  271.        - A x'02' for resetting the presentation space name 
  272.  
  273.     o 1-60 bytes containing the new presentation space name. If byte 2 is x'02' 
  274.       then this field is optional. The maximum length of the new name is 60 
  275.       characters. 
  276.  
  277.  Returns: 
  278.  
  279.  The return code from the Change_Window_Name EHLLAPI service is returned. 
  280.  
  281.  '0'       Ok 
  282.  
  283.  '1'       Byte 1 of nameparm is invalid 
  284.  
  285.  '2'       nameparm error 
  286.  
  287.  '9'       System error 
  288.  
  289.  '11'      Session is stopped 
  290.  
  291.  Example: 
  292.  
  293.  Change the 'A' session window name to "My Program". 
  294.  
  295.   call REXHLLAPI 'Connect_PM_Srvcs', 'A'
  296.   call REXHLLAPI 'Change_Window_Name', 'A' || c2x('01') || 'My Program'
  297.   call REXHLLAPI 'Disconnect_PM_Srvcs', 'A'
  298.  
  299.  
  300. ΓòÉΓòÉΓòÉ 3.2. Change_Switch_Name (Service 105) ΓòÉΓòÉΓòÉ
  301.  
  302. Syntax: 
  303.  
  304.  
  305.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Change_Switch_Name', nameparmΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  306.  
  307. Purpose: 
  308.  
  309. Changes the presentation space switchlist name to the specified new name. The 
  310. old name is saved by the system and is restored on a call to the Disconnect_PS 
  311. service or changed on a subsequent call to the Change_Switch_Name service. 
  312.  
  313. Prerequisite Calls: 
  314.  
  315. Connect_Window_Srvcs service 
  316.  
  317. Arguments: 
  318.  
  319.  argument 1     The string constant or a variable whose contents are 
  320.                 'Change_Switch_Name'. 
  321.  
  322.  nameparm       A string of maximum length layed out as follows: 
  323.  
  324.     o 1 byte short session name 
  325.     o 1 byte change option 
  326.  
  327.        - A x'01' for changing the switch list name of the PS 
  328.        - A x'02' for resetting the switch list name of the PS 
  329.  
  330.     o 1-60 bytes containing the new switch list name. If byte 2 is x'02' then 
  331.       this field is optional. The maximum length of the new name is 60 
  332.       characters. 
  333.  
  334.  Returns: 
  335.  
  336.  The return code from the Change_Switch_Name EHLLAPI service is returned. 
  337.  
  338.  '0'       Ok 
  339.  
  340.  '1'       Byte 1 of nameparm is invalid 
  341.  
  342.  '2'       nameparm error 
  343.  
  344.  '9'       System error 
  345.  
  346.  '11'      Session is stopped 
  347.  
  348.  Example: 
  349.  
  350.  Change the 'A' session switch list name to "My Program". 
  351.  
  352.   call REXHLLAPI 'Connect_PM_Srvcs', 'A'
  353.   call REXHLLAPI 'Change_Switch_Name', 'A' || c2x('01') || 'My Program'
  354.   call REXHLLAPI 'Disconnect_PM_Srvcs', 'A'
  355.  
  356.  
  357. ΓòÉΓòÉΓòÉ 3.3. Connect_PM_Srvcs (Service 101) ΓòÉΓòÉΓòÉ
  358.  
  359. Syntax: 
  360.  
  361.  
  362.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Connect_PM_Srvcs', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  363.  
  364. Purpose: 
  365.  
  366. Connects the application to a presentation space for only the EHLLAPI 
  367. Presentation Manager services. 
  368.  
  369. Prerequisite Calls: 
  370.  
  371. None 
  372.  
  373. Arguments: 
  374.  
  375.  argument 1     The string constant or a variable whose contents are 
  376.                 'Connect_PM_Srvcs'. 
  377.  
  378.  session_id     The short session name of the presentation space in which PM 
  379.                 services are to be performed. 
  380.  
  381.  Returns: 
  382.  
  383.  The return code from the Connect_PM_Srvcs EHLLAPI service is returned. 
  384.  
  385.  '0'       Ok 
  386.  
  387.  '1'       session_id was invalid 
  388.  
  389.  '9'       System error 
  390.  
  391.  '10'      Function not supported 
  392.  
  393.  '11'      System resource unavailable. Presentation space already in use. 
  394.  
  395.  Example: 
  396.  
  397.   retc = REXHLLAPI('Connect_PM_Srvcs', 'A')
  398.  
  399.  
  400. ΓòÉΓòÉΓòÉ 3.4. Connect_PS (Service 1) ΓòÉΓòÉΓòÉ
  401.  
  402. Syntax: 
  403.  
  404.  
  405.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Connect_PS', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  406.  
  407. Purpose: 
  408.  
  409. Connects the program to a logical Communications Manager session specified by 
  410. the presentation space short name session_id. See the Communications Manager 
  411. Configuration services to determine the names of the sessions configured on 
  412. your system or use the service Query_sessions to obtain the session information 
  413. dynamically. 
  414.  
  415. Prerequisite Calls: 
  416.  
  417. None 
  418.  
  419. Arguments: 
  420.  
  421.  argument 1     The string constant or a variable whose contents are 
  422.                 'Connect_PS'. 
  423.  
  424.  session_id     The short session name (1 character) of the session you wish to 
  425.                 be connected to. The case of this character is not important. 
  426.  
  427.  Returns: 
  428.  
  429.  The return code from the Connect_PS EHLLAPI service is returned. 
  430.  
  431.  '0'       Connected ok 
  432.  
  433.  '1'       Invalid session_id 
  434.  
  435.  '4'       Connect, session busy 
  436.  
  437.  '5'       Connect, session locked 
  438.  
  439.  '9'       System error 
  440.  
  441.  '11'      Session already connected to another application 
  442.  
  443.  Note:  Other return codes are possible from this service. 
  444.  
  445.  Example: 
  446.  
  447.   retc = REXHLLAPI('Connect_PS', 'A')
  448.  
  449.  
  450. ΓòÉΓòÉΓòÉ 3.5. Convert_Position (Service 99) ΓòÉΓòÉΓòÉ
  451.  
  452. Syntax: 
  453.  
  454.  
  455.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇrow = RexHLLAPI('Convert_Position', session_id, position)ΓöÇΓöÇΓöÇ
  456.  
  457. Purpose: 
  458.  
  459. Converts position to row/column. 
  460.  
  461. Prerequisite Calls: 
  462.  
  463. None 
  464.  
  465. Arguments: 
  466.  
  467.  argument 1     The string constant or a variable whose contents are 
  468.                 'Convert_Position'. 
  469.  
  470.  session_id     The short session name (1 character) identifying the session 
  471.                 from which the conversion info is to be taken. 
  472.  
  473.  position       The position to be converted to row/column format. Valid 
  474.                 argument values for a 24 by 80 presentation space would be 1 to 
  475.                 1920. 
  476.  
  477.  Returns: 
  478.  
  479.  The return code from the Convert_Position EHLLAPI service is returned. 
  480.  
  481.  '0'            Position specified is outside the presentation space 
  482.  
  483.  > '0' < '9998' The row number of the converted position 
  484.  
  485.  = '9998'       Invalid session_id 
  486.  
  487.  = '9998'       REXHLAPI internal error. Contact author. 
  488.  
  489.  Note:  If this function returns a value > '0' < '9998' then the REXX variable 
  490.  HLLAPIRETC contains the column number of the converted position. 
  491.  
  492.  Example: 
  493.  
  494.  The following example 
  495.  
  496.   row = REXHLLAPI('convert_pos', 'a', 170);
  497.   /* Now ROW = '3' and HLLAPIRETC = '10' */
  498.  
  499.  would return '3' and set HLLAPIRETC = '10' in a 24 by 80 presentation space. 
  500.  
  501.  
  502. ΓòÉΓòÉΓòÉ 3.6. Convert_RowCol (Service 99) ΓòÉΓòÉΓòÉ
  503.  
  504. Syntax: 
  505.  
  506.  
  507.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇpos = RexHLLAPI('Convert_RowCol', session_id, column, row)ΓöÇΓöÇ
  508.  
  509. Purpose: 
  510.  
  511. Converts row/column info in the session session_id, to presentation space 
  512. position. 
  513.  
  514. Prerequisite Calls: 
  515.  
  516. None 
  517.  
  518. Arguments: 
  519.  
  520.  argument 1     The string constant or a variable whose contents are 
  521.                 'Convert_RowCol'. 
  522.  
  523.  session_id     The short session name (1 character) identifying the session 
  524.                 from which the conversion info is to be taken. 
  525.  
  526.  col            The column component to be converted. Valid argument values for 
  527.                 a 24 by 80 presentation space would be 1 to 80. 
  528.  
  529.  row            The row component to be converted. Valid argument values for a 
  530.                 24 by 80 presentation space would be 1 to 24. 
  531.  
  532.  Returns: 
  533.  
  534.  The return code from the Convert_RowCol EHLLAPI service is returned. 
  535.  
  536.  '0'            Row or column specified is outside presentation space 
  537.  
  538.  > '0' < '9998' The position (upper left is position 1) 
  539.  
  540.  = '9998'       Invalid session_id 
  541.  
  542.  = '9998'       REXHLAPI internal error. Contact author. 
  543.  
  544.  Example: 
  545.  
  546.  The following example 
  547.  
  548.   pos = REXHLLAPI('convert_rowcol', 'a', 10, 3);
  549.  
  550.  would return '170' in a 24 by 80 presentation space. 
  551.  
  552.  
  553. ΓòÉΓòÉΓòÉ 3.7. Copy_Field_To_Str (Service 34) ΓòÉΓòÉΓòÉ
  554.  
  555. Syntax: 
  556.  
  557.  
  558.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇfielddata = RexHLLAPI('Copy_Field_To_Str', pos, length)ΓöÇΓöÇΓöÇΓöÇΓöÇ
  559.  
  560. Purpose: 
  561.  
  562. Copies the field data located at pos in the connected presentation space, for 
  563. length length. The pos and length values can be found by using the 
  564. Find_field_pos and Find_field_len services described elsewhere in this manual. 
  565.  
  566. Prerequisite Calls: 
  567.  
  568. Connect_PS service 
  569.  
  570. Arguments: 
  571.  
  572.  argument 1     The string constant or a variable whose contents are 
  573.                 'Copy_field_to_str'. 
  574.  
  575.  pos            The position of the field to be copied. 
  576.  
  577.  length         The number of character to be copied. 
  578.  
  579.  Returns: 
  580.  
  581.  The requested field data string is returned. 
  582.  
  583.  ''          No field data at pos, or invalid pos. Check the value of the REXX 
  584.              variable HLLAPIRETC. 
  585.  
  586.  fielddata   The data of length length or up to the end of the field at pos. 
  587.  
  588.  Example: 
  589.  
  590.  The following example 
  591.  
  592.   fielddata = REXHLLAPI('copy_field_to_str', 26, 10);
  593.  
  594.  would copy 10 characters at position 26 from the currently presentation space. 
  595.  
  596.  
  597. ΓòÉΓòÉΓòÉ 3.8. Copy_Oia (Service 13) ΓòÉΓòÉΓòÉ
  598.  
  599. Syntax: 
  600.  
  601.  
  602.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇoiadata = RexHLLAPI('Copy_Oia')ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  603.  
  604. Purpose: 
  605.  
  606. Returns the Operator Information Area from the connected session. Refer to the 
  607. IBM Operating System/2 Extended Edition Version 1.2 EHLLAPI Programming 
  608. Reference manual for more information on the contents of the Oia data. 
  609.  
  610. Prerequisite Calls: 
  611.  
  612. Connect_PS service 
  613.  
  614. Arguments: 
  615.  
  616.  argument 1     The string constant or a variable whose contents are 
  617.                 'Copy_Oia'. 
  618.  
  619.  Returns: 
  620.  
  621.  The Operator Information Area data string is returned. 
  622.  
  623.  ''          Not connected or other error. Check the value of the REXX variable 
  624.              HLLAPIRETC. 
  625.  
  626.  oiadata     A 103 byte copy of the OIA data consisting of 
  627.  
  628.     o A 1 byte format field  set to '1' 
  629.     o An 80 byte data field with the contents of the OIA line 
  630.     o A 22 byte OIA group field 
  631.  
  632.  
  633. ΓòÉΓòÉΓòÉ 3.9. Copy_PS (Service 5) ΓòÉΓòÉΓòÉ
  634.  
  635. Syntax: 
  636.  
  637.  
  638.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇpsdata = RexHLLAPI('Copy_PS')ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  639.  
  640. Purpose: 
  641.  
  642. Return the entire contents of the currently connected session or '' (null 
  643. string) if not connected to a session. The contents of the returned data is 
  644. dependant on the setting of the EAB (Extended Attribute Bytes) value in the 
  645. Set_session_parms service described elsewhere. Briefly, if EAB is OFF then only 
  646. the TEXT of the presentation space will be returned. If EAB is ON then 2 bytes 
  647. will be returned for each displayable byte on the screen. The first will 
  648. contain the EAB value, the second will contain the text data. 
  649.  
  650. Prerequisite Calls: 
  651.  
  652. Connect_PS service 
  653.  
  654. Arguments: 
  655.  
  656.  argument 1     The string constant or a variable whose contents are 'Copy_PS'. 
  657.  
  658.  Returns: 
  659.  
  660.  The entire contents of the currently connected presentation space are returned 
  661.  as a single string. 
  662.  
  663.  ''        Not connected or other error. Check the value of the REXX variable 
  664.            HLLAPIRETC. 
  665.  
  666.  psdata    1920 bytes of data if the presentation space is 24 x 80 and the EAB 
  667.            is OFF, 3840 bytes if the EAB is ON. 
  668.  
  669.  
  670. ΓòÉΓòÉΓòÉ 3.10. Copy_PS_To_Str (Service 8) ΓòÉΓòÉΓòÉ
  671.  
  672. Syntax: 
  673.  
  674.  
  675.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇpsdata = RexHLLAPI('Copy_PS_To_Str', pos, length)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  676.  
  677. Purpose: 
  678.  
  679. Returns data from the curently connected session from position pos for length 
  680. length, or '' if not connect or an error. See the discussion of EAB setting in 
  681. the Copy_PS service elsewhere. 
  682.  
  683. Prerequisite Calls: 
  684.  
  685. Connect_PS service 
  686.  
  687. Arguments: 
  688.  
  689.  argument 1     The string constant or a variable whose contents are 
  690.                 'Copy_PS_to_str'. 
  691.  
  692.  Returns: 
  693.  
  694.  The specified portion of the currently connected presentation space is 
  695.  returned as a string. 
  696.  
  697.  ''        Not connected or other error. Check the value of the REXX variable 
  698.            HLLAPIRETC. 
  699.  
  700.  psdata    length characters of data if the EAB is OFF or length x 2 if the EAB 
  701.            is ON. 
  702.  
  703.  Example: 
  704.  
  705.  The following example 
  706.  
  707.   psdata = REXHLLAPI('copy_ps_to_str', 26, 10);
  708.  
  709.  would copy 10 characters at position 26 from the currently presentation space. 
  710.  
  711.  
  712. ΓòÉΓòÉΓòÉ 3.11. Copy_Str_to_Field (Service 33) ΓòÉΓòÉΓòÉ
  713.  
  714. Syntax: 
  715.  
  716.  
  717.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Copy_str_to_field', string, posΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  718.  
  719. Purpose: 
  720.  
  721. Copies string to the field at pos position in the connected session. 
  722.  
  723. Prerequisite Calls: 
  724.  
  725. Connect_PS service 
  726.  
  727. Arguments: 
  728.  
  729.  argument 1     The string constant or a variable whose contents are 
  730.                 'Copy_str_to_field'. 
  731.  
  732.  string         Data string to be copied. 
  733.  
  734.  pos            Position of the destination field in the presentation space. 
  735.  
  736.  Returns: 
  737.  
  738.  The return code from the Copy_str_to_field EHLLAPI service is returned. 
  739.  
  740.  '0'       Ok 
  741.  
  742.  '1'       Target not allowed 
  743.  
  744.  '2'       Zero length string 
  745.  
  746.  '5'       Protected field or bad string data (bad attribute) 
  747.  
  748.  '6'       Data copied, but truncated because string was longer than the field. 
  749.  
  750.  '7'       pos is invalid 
  751.  
  752.  '24'      The screen has no fields (unformatted) 
  753.  
  754.  Example: 
  755.  
  756.  The following example 
  757.  
  758.   call REXHLLAPI 'copy_str_to_field', 'logoff', 90
  759.  
  760.  would copy the string 'logoff' to the currently presentation space field at 
  761.  postion 90. 
  762.  
  763.  
  764. ΓòÉΓòÉΓòÉ 3.12. Copy_Str_to_PS (Service 15) ΓòÉΓòÉΓòÉ
  765.  
  766. Syntax: 
  767.  
  768.  
  769.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Copy_str_to_PS', string, posΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  770.  
  771. Purpose: 
  772.  
  773. Copies string to pos position in the connected session. 
  774.  
  775. Prerequisite Calls: 
  776.  
  777. Connect_PS service 
  778.  
  779. Arguments: 
  780.  
  781.  argument 1     The string constant or a variable whose contents are 
  782.                 'Copy_str_to_PS'. 
  783.  
  784.  string         Data string to be copied. 
  785.  
  786.  pos            Position of the destination in the presebtation space. 
  787.  
  788.  Returns: 
  789.  
  790.  The return code from the Copy_str_to_PS EHLLAPI service is returned. 
  791.  
  792.  '0'       Ok 
  793.  
  794.  '1'       Target not allowed 
  795.  
  796.  '2'       Zero length string 
  797.  
  798.  '5'       Protected field or bad string data (bad attribute) 
  799.  
  800.  '6'       Data copied, but truncated because string was longer than the field. 
  801.  
  802.  '7'       pos is invalid 
  803.  
  804.  Example: 
  805.  
  806.  The following example 
  807.  
  808.   call REXHLLAPI 'copy_str_to_ps', 'logoff', 90
  809.  
  810.  would copy the string 'logoff' to the currently presentation space at position 
  811.  90. 
  812.  
  813.  
  814. ΓòÉΓòÉΓòÉ 3.13. Disconnect_PM_Srvcs (Service 102) ΓòÉΓòÉΓòÉ
  815.  
  816. Syntax: 
  817.  
  818.  
  819.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Disconnect_PM_Srvcs', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  820.  
  821. Purpose: 
  822.  
  823. Disconnects the Presentation Manager window services connection. 
  824.  
  825. Prerequisite Calls: 
  826.  
  827. Connect_Window_Srvcs service 
  828.  
  829. Arguments: 
  830.  
  831.  argument 1     The string constant or a variable whose contents are 
  832.                 'Disconnect_PM_Srvcs'. 
  833.  
  834.  Session_id     The short session presentation space name from which to 
  835.                 disconnect. 
  836.  
  837.  Returns: 
  838.  
  839.  The return code from the Disconnect_PM_Srvcs EHLLAPI service is returned. 
  840.  
  841.  '0'       Ok 
  842.  
  843.  '1'       Not connected 
  844.  
  845.  '9'       System error 
  846.  
  847.  Example: 
  848.  
  849.   call REXHLLAPI 'Disconnect_PM_Srvcs', 'A'
  850.  
  851.  
  852. ΓòÉΓòÉΓòÉ 3.14. Disconnect_PS (Service 2) ΓòÉΓòÉΓòÉ
  853.  
  854. Syntax: 
  855.  
  856.  
  857.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Disconnect_PS'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  858.  
  859. Purpose: 
  860.  
  861. Disconnects from the currently connected presentation space session. 
  862.  
  863. Prerequisite Calls: 
  864.  
  865. Connect_PS service 
  866.  
  867. Arguments: 
  868.  
  869.  argument 1     The string constant or a variable whose contents are 
  870.                 'Disconnect_PS'. 
  871.  
  872.  Returns: 
  873.  
  874.  The return code from the Disconnect_PS EHLLAPI service is returned. 
  875.  
  876.  '0'       Ok 
  877.  
  878.  '1'       Not connected 
  879.  
  880.  Example: 
  881.  
  882.   call REXHLLAPI 'Disconnect_PS'
  883.  
  884.  
  885. ΓòÉΓòÉΓòÉ 3.15. Find_Field_Len (Service 32) ΓòÉΓòÉΓòÉ
  886.  
  887. Syntax: 
  888.  
  889.  
  890.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Find_Field_Len', search_option, posΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  891.  
  892. Purpose: 
  893.  
  894. Returns the length of the field with attributes search_option starting at 
  895. position pos within the current field or '0' if the specified field type could 
  896. not be found. 
  897.  
  898. Prerequisite Calls: 
  899.  
  900. Connect_PS service 
  901.  
  902. Arguments: 
  903.  
  904.  argument 1          The string constant or a variable whose contents are 
  905.                      'Find_Field_Len'. 
  906.  
  907.  search_option        The values for search_option are: 
  908.  
  909.     ' ' or 'T '    The current field (the field that the cursor is in) 
  910.     'P '           Previous field, either protected or unprotected. 
  911.     'NP'           Next protected field 
  912.     'NU'           Next unprotected field 
  913.     'PP'           Previous protected field 
  914.     'PU'           Previous unprotected field 
  915.  
  916.  pos                 The starting position in the presentation space from which 
  917.                      the search is to begin. 
  918.  
  919.  Returns: 
  920.  
  921.  The length of the found specified field type is returned. 
  922.  
  923.  '0'       The specified field type could not be located 
  924.  
  925.  > '0'     The length of the found specified field type 
  926.  
  927.  
  928. ΓòÉΓòÉΓòÉ 3.16. Find_Field_Pos (Service 31) ΓòÉΓòÉΓòÉ
  929.  
  930. Syntax: 
  931.  
  932.  
  933.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Find_Field_Pos', search_option, posΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  934.  
  935. Purpose: 
  936.  
  937. Returns the position of the field with attributes search_option starting at 
  938. position pos within the presentation space or '0' if the specified field type 
  939. could not be found. 
  940.  
  941. Prerequisite Calls: 
  942.  
  943. Connect_PS service 
  944.  
  945. Arguments: 
  946.  
  947.  argument 1          The string constant or a variable whose contents are 
  948.                      'Find_Field_Pos'. 
  949.  
  950.  search_option       The values for search_option are: 
  951.  
  952.     ' ' or 'T '    The current field (the field that the cursor is in) 
  953.     'P '           Previous field, either protected or unprotected. 
  954.     'NP'           Next protected field 
  955.     'NU'           Next unprotected field 
  956.     'PP'           Previous protected field 
  957.     'PU'           Previous unprotected field 
  958.  
  959.  pos                 The starting position in the presentation space from which 
  960.                      the search is to begin. 
  961.  
  962.  Returns: 
  963.  
  964.  The position of the found specified field type is returned. 
  965.  
  966.  '0'       The specified field type could not be located 
  967.  
  968.  > '0'     The position of the found specified field type 
  969.  
  970.  
  971. ΓòÉΓòÉΓòÉ 3.17. Get_key (Service 51) ΓòÉΓòÉΓòÉ
  972.  
  973. Syntax: 
  974.  
  975.  
  976.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇkeyval = RexHLLAPI('Get_key', session_id)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  977.  
  978. Purpose: 
  979.  
  980. Return the next intercepted keystroke from the session specified. The service 
  981. Start_Keystroke_Intercept enables the application to intercept keystrokes from 
  982. the user. 
  983.  
  984. For more information on the returned data from this function refer to the IBM 
  985. operating System/2 Extended Edition Version 1.2 EHLLAPI Programming Reference 
  986. manual. 
  987.  
  988. Prerequisite Calls: 
  989.  
  990. Start_Key_Intercept service 
  991.  
  992. Arguments: 
  993.  
  994.  argument 1     The string constant or a variable whose contents are 'Get_Key'. 
  995.  
  996.  session_id     The short session name of the presentation space from which to 
  997.                 obtain the keystroke. 
  998.  
  999.  Returns: 
  1000.  
  1001.  The intercepted keystroke data string is returned. 
  1002.  
  1003.  ''        If an error, or not connected to session_id. Check the value of the 
  1004.            REXX variable HLLAPIRETC. 
  1005.  
  1006.  keyval    If no error, the contents of string depend on the keys pressed by 
  1007.            the 3270 session operator, for example: 
  1008.  
  1009.     Byte 1         The session_id 
  1010.     Byte 2         The ASCII code for the key 'a' 
  1011.     Bytes 3-4      A keystroke mnemonic, '@E' (enter) 
  1012.  
  1013.  Other lengths of keyval are possible (maximum length 8 characters) as well as 
  1014.  other combinations of data. 
  1015.  
  1016.  
  1017. ΓòÉΓòÉΓòÉ 3.18. Get_RexHLLAPI_Ver ΓòÉΓòÉΓòÉ
  1018.  
  1019. Syntax: 
  1020.  
  1021.  
  1022.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇver = RexHLLAPI('Get_RexHLLAPI_Ver')ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1023.  
  1024. Purpose: 
  1025.  
  1026. Returns the version of the REXHLAPI.DLL which is currently running. This 
  1027. function does not execute any EHLLAPI services. 
  1028.  
  1029. Prerequisite Calls: 
  1030.  
  1031. None 
  1032.  
  1033. Arguments: 
  1034.  
  1035. None. 
  1036.  
  1037. Returns: 
  1038.  
  1039. The version and compilation date data string is returned. 
  1040.  
  1041.  ''        Error, invalid number of arguments. 
  1042.  
  1043.  ver       String containing REXHLAPI version info in the form 'x.xx mmm 
  1044.            [d]d,yyyy' where 
  1045.  
  1046.     o x.xx is the version number 
  1047.     o mmm is the month of compliation 
  1048.     o dd is the day of compilation (1 or 2 characters) 
  1049.     o yyyy is the year of compliation 
  1050.  
  1051.  Example: 
  1052.  
  1053.   version = substr(REXHLLAPI('Get_RexHLLAPI_Ver'), 1, 4)
  1054.   compdate = substr(REXHLLAPI('Get_RexHLLAPI_Ver'), 6)
  1055.  
  1056.  
  1057. ΓòÉΓòÉΓòÉ 3.19. Pause (Service 18) ΓòÉΓòÉΓòÉ
  1058.  
  1059. Syntax: 
  1060.  
  1061.  
  1062.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Pause', nΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1063.  
  1064. Purpose: 
  1065.  
  1066. Causes a timed pause of n 1/2 second intervals to occur. 
  1067.  
  1068. If the Set_session_Parms service (described elsewhere) set IPAUSE and you have 
  1069. done a Start_host_notify service, then the pause will also be ended by an 
  1070. update to the to the host screen. 
  1071.  
  1072. Prerequisite Calls: 
  1073.  
  1074. None 
  1075.  
  1076. Arguments: 
  1077.  
  1078.  argument 1     The string constant or a variable whose contents are 'Pause'. 
  1079.  
  1080.  n              The number of 1/2 seconds to pause. 
  1081.  
  1082.  Returns: 
  1083.  
  1084.  The return code from the Pause EHLLAPI service is returned. 
  1085.  
  1086.  '0'       Pause duration completed 
  1087.  
  1088.  '9'       System error 
  1089.  
  1090.  '26'      A host session has been updated, use Query_host_Update service for 
  1091.            more information 
  1092.  
  1093.  Example: 
  1094.  
  1095.  The following example 
  1096.  
  1097.   call REXHLLAPI 'Pause', 20
  1098.  
  1099.  will cause a 10 second, or if IPAUSE has been set will cause a pause until the 
  1100.  host presentation space has been updated or 10 second pause whichever is 
  1101.  shorter. 
  1102.  
  1103.  
  1104. ΓòÉΓòÉΓòÉ 3.20. PM_Window_Status (Service 104) ΓòÉΓòÉΓòÉ
  1105.  
  1106. Syntax: 
  1107.  
  1108.  
  1109.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇstatusdata = RexHLLAPI('PM_Window_Status', statusdata)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1110.  
  1111. Purpose: 
  1112.  
  1113. Allows an application to query or change a PS window size, location, or visible 
  1114. state. 
  1115.  
  1116. Prerequisite Calls: 
  1117.  
  1118. Connect_Window_Srvcs service 
  1119.  
  1120. Arguments: 
  1121.  
  1122.  argument 1     The string constant or a variable whose contents are 
  1123.                 'PM_Window_Status'. 
  1124.  
  1125.  statusdata     16 bytes of data specifying the status action to take. Refer to 
  1126.                 the IBM Operating System/2 Extended Edition Version 1.2 EHLLAPI 
  1127.                 Programming Reference manual for the layout of the data. 
  1128.  
  1129.  Returns: 
  1130.  
  1131.  The window status data string is returned. 
  1132.  
  1133.  ''             Error. Check the value of the REXX variable HLLAPIRETC. 
  1134.  
  1135.  statusdata     Function successful, status information returned 
  1136.  
  1137.  
  1138. ΓòÉΓòÉΓòÉ 3.21. Post_Intercept_Status (Service 52) ΓòÉΓòÉΓòÉ
  1139.  
  1140. Syntax: 
  1141.  
  1142.  
  1143.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Post_Intercept_Status', statusdataΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1144.  
  1145. Purpose: 
  1146.  
  1147. Informs EHLLAPI that a keystroke obtained through the Get_Key service was 
  1148. accepted or rejected. 
  1149.  
  1150. Prerequisite Calls: 
  1151.  
  1152. Start_Key_Intercept service 
  1153.  
  1154. Arguments: 
  1155.  
  1156.  argument 1     The string constant or a variable whose contents are 
  1157.                 'Post_Intercept_Status'. 
  1158.  
  1159.  statusdata     2 bytes of data as follows: 
  1160.  
  1161.     o 1 byte indicating the session id or a blank specifying the current 
  1162.       connected session 
  1163.     o 1 byte option. 'A' for keystroke accepted or 'R' for keystroke rejected. 
  1164.  
  1165.  Returns: 
  1166.  
  1167.  The return code from the Post_Intercept_Status EHLLAPI service is returned. 
  1168.  
  1169.  '0'       Ok 
  1170.  
  1171.  '1'       Presentation space invalid 
  1172.  
  1173.  '2'       Invalid option specified 
  1174.  
  1175.  '8'       No prior Start_Keystroke_Intercept service has been called 
  1176.  
  1177.  '9'       System error 
  1178.  
  1179.  Example: 
  1180.  
  1181.  The following example 
  1182.  
  1183.   keydata = REXHLLAPI('Get_key', 'A')
  1184.   call REXHLLAPI 'Post_intercept_status', 'AR'
  1185.  
  1186.  will reject the previous keystroke obtained by the Get_Key service. 
  1187.  
  1188.  
  1189. ΓòÉΓòÉΓòÉ 3.22. Query_Close_Intercept (Service 42) ΓòÉΓòÉΓòÉ
  1190.  
  1191. Syntax: 
  1192.  
  1193.  
  1194.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Query_Close_Intercept', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1195.  
  1196. Purpose: 
  1197.  
  1198. Allows the application to determine if the CLOSE option on the pull-down menu 
  1199. was selected. 
  1200.  
  1201. Prerequisite Calls: 
  1202.  
  1203. Start_Close_Intercept service 
  1204.  
  1205. Arguments: 
  1206.  
  1207.  argument 1     The string constant or a variable whose contents are 
  1208.                 'Query_Close_Intercept'. 
  1209.  
  1210.  session_id     The short session name of the presentation space to query 
  1211.  
  1212.  Returns: 
  1213.  
  1214.  The return code from the Query_Close_Intercept EHLLAPI service is returned. 
  1215.  
  1216.  '0'       Close intercept did not occur 
  1217.  
  1218.  '1'       Presentation space invalid 
  1219.  
  1220.  '2'       Invalid parameter specified 
  1221.  
  1222.  '8'       No prior Start_Close_Intercept service has been called 
  1223.  
  1224.  '9'       System error 
  1225.  
  1226.  '12'      The session is stopped 
  1227.  
  1228.  '26'      A close intercept occurred since the last Query_Close_Intercept 
  1229.            service call 
  1230.  
  1231.  
  1232. ΓòÉΓòÉΓòÉ 3.23. Query_Cursor_Loc (Service 7) ΓòÉΓòÉΓòÉ
  1233.  
  1234. Syntax: 
  1235.  
  1236.  
  1237.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇpos = RexHLLAPI('Query_Cursor_Loc')ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1238.  
  1239. Purpose: 
  1240.  
  1241. Returns the cursor position in the currently connected session or '0' if not 
  1242. connected to a session. 
  1243.  
  1244. Prerequisite Calls: 
  1245.  
  1246. Connect_PS service 
  1247.  
  1248. Arguments: 
  1249.  
  1250.  argument 1     The string constant or a variable whose contents are 
  1251.                 'Query_Cursor_Loc'. 
  1252.  
  1253.  Returns: 
  1254.  
  1255.  The position of the cursor is returned. 
  1256.  
  1257.  '0'       System error occured or not connected 
  1258.  
  1259.  > '0'     The cursor position within the connected presentation space 
  1260.  
  1261.  
  1262. ΓòÉΓòÉΓòÉ 3.24. Query_Field_Attr (Service 14) ΓòÉΓòÉΓòÉ
  1263.  
  1264. Syntax: 
  1265.  
  1266.  
  1267.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇattr = RexHLLAPI('Query_Field_Attr', pos)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1268.  
  1269. Purpose: 
  1270.  
  1271. Returns the text representation of the attribute of the field located at 
  1272. position pos in the currently connected session or '0' if not connected to a 
  1273. session or the session was currently an unformatted screen. The attribute bytes 
  1274. are greater than x'C0' and are returned as printable characters ('C0' in this 
  1275. case). 
  1276.  
  1277. Prerequisite Calls: 
  1278.  
  1279. Connect_PS service 
  1280.  
  1281. Arguments: 
  1282.  
  1283.  argument 1     The string constant or a variable whose contents are 
  1284.                 'Query_Field_Attr'. 
  1285.  
  1286.  pos            The position within the connected presentation space 
  1287.  
  1288.  Returns: 
  1289.  
  1290.  The field attribute byte is returned. 
  1291.  
  1292.  ''        System error occured, not connected or the screen was unformatted. 
  1293.            Check the value of the REXX variable HLLAPIRETC. 
  1294.  
  1295.  attr      One byte representation of the field attribute 
  1296.  
  1297.  
  1298. ΓòÉΓòÉΓòÉ 3.25. Query_Host_Update (Service 24) ΓòÉΓòÉΓòÉ
  1299.  
  1300. Syntax: 
  1301.  
  1302.  
  1303.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexHLLAPI('Query_Host_Update', session_id)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1304.  
  1305. Purpose: 
  1306.  
  1307. Determines if the host has updated the presentation space, OIA or both since: 
  1308.  
  1309.  o The Start_Host_Notification service was called. 
  1310.  o A previous call to the Query_Host_Update service. 
  1311.  
  1312.  Prerequisite Calls: 
  1313.  
  1314.  Start_Host_Notify service 
  1315.  
  1316.  Arguments: 
  1317.  
  1318.  argument 1     The string constant or a variable whose contents are 
  1319.                 'Query_Host_Update'. 
  1320.  
  1321.  session_id     The short name for the presentation space to query 
  1322.  
  1323.  Returns: 
  1324.  
  1325.  The return code from the Query_Host_Update EHLLAPI service is returned. 
  1326.  
  1327.  '0'       No update since last call 
  1328.  
  1329.  '1'       Not connected to a session 
  1330.  
  1331.  '8'       Host notification has not been requested (see the Start_Host_Notify 
  1332.            described elsewhere). 
  1333.  
  1334.  '9'       System error 
  1335.  
  1336.  '21'      The OIA has been updated 
  1337.  
  1338.  '22'      The Presentation space has been updated 
  1339.  
  1340.  '23'      Both OIA and PS have been updated 
  1341.  
  1342.  
  1343. ΓòÉΓòÉΓòÉ 3.26. Query_Session_Status (Service 22) ΓòÉΓòÉΓòÉ
  1344.  
  1345. Syntax: 
  1346.  
  1347.  
  1348.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇstatus = RexHLLAPI('Query_Session_Status', session_id)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1349.  
  1350. Purpose: 
  1351.  
  1352. Returns 18 bytes of session status information if the call is successful or '' 
  1353. if not. The 18 bytes are layed out as follows: 
  1354.  
  1355. Prerequisite Calls: 
  1356.  
  1357. None 
  1358.  
  1359. Arguments: 
  1360.  
  1361.  argument 1     The string constant or a variable whose contents are 
  1362.                 'Query_Session_Status'. 
  1363.  
  1364.  session_id     The short name for the presentation space to query 
  1365.  
  1366.  Returns: 
  1367.  
  1368.  The session status data string is returned. 
  1369.  
  1370.  ''        Error. Check the value of the REXX variable HLLAPIRETC. 
  1371.  
  1372.  status    18 bytes layed out as follows: 
  1373.  
  1374.     o 1 byte session short name 
  1375.     o 8 byte session long name in ASCII 
  1376.     o 1 byte session type 
  1377.  
  1378.        'D'  DFT mode session 
  1379.        'C'  CUT mode session 
  1380.        'F'  5250 session 
  1381.  
  1382.     o 1 byte binary number containing Control Program features 
  1383.     o 2 byte binary number (stored in normal Intel reversed format) containing 
  1384.       the number of rows in the session 
  1385.     o 2 byte binary number (stored in normal Intel reversed format) containing 
  1386.       the number of columns in the session 
  1387.     o 2 byte binary number (stored in normal Intel reversed format) containing 
  1388.       the host code page value. 
  1389.  
  1390.  Note:  For the last three fields (row, col, codepage) use c2d(reverse(x)) 
  1391.  after parsing them out of the string to get their decimal values 
  1392.  
  1393.  
  1394. ΓòÉΓòÉΓòÉ 3.27. Query_sessions (Service 10) ΓòÉΓòÉΓòÉ
  1395.  
  1396. Syntax: 
  1397.  
  1398.  
  1399.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇsessiondata = RexHLLAPI('Query_sessions')ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1400.  
  1401. Purpose: 
  1402.  
  1403. Returns 12 bytes for each configured session or '' if an error occurred. 
  1404.  
  1405. Prerequisite Calls: 
  1406.  
  1407. None 
  1408.  
  1409. Arguments: 
  1410.  
  1411.  argument 1     The string constant or a variable whose contents are 
  1412.                 'Query_Sessions'. 
  1413.  
  1414.  Returns: 
  1415.  
  1416.  The session status data string is returned. 
  1417.  
  1418.  ''             Error. Check the value of the REXX variable HLLAPIRETC. 
  1419.  
  1420.  sessiondata    12 bytes for each session layed out as follows: 
  1421.  
  1422.     o 1 byte session short name 
  1423.     o 8 byte session long name in ASCII 
  1424.     o 1 byte session type 'H' 
  1425.     o 2 byte binary number (stored in standard Intel reversed format) 
  1426.       containing the presentation space size for that session. 
  1427.  
  1428.       Note:  For the last field (PSsize) use c2d(reverse(x)) after parsing it 
  1429.       out of the string to get the decimal value 
  1430.  
  1431.  Example: 
  1432.  
  1433.  The following example 
  1434.  
  1435.   session_info = REXHLLAPI('Query_sessions')
  1436.   if length(session_info) < 13 then do
  1437.     say 'No Comm. Mgr. sessions are active, canceling execution.'
  1438.     exit
  1439.     end
  1440.   j = 1
  1441.   session.0 = 0
  1442.   do i = 13 by 12 for (length(session_info) / 12) - 1
  1443.     if i > length(session_info) then leave
  1444.     session.j = substr(session_info, i, 1)
  1445.     j = j + 1
  1446.     session.0 = session.0 + 1
  1447.     end
  1448.  
  1449.  will obtain all the short session id's and assign them to the stem variable 
  1450.  session with session.0 containing the total number of available sessions. 
  1451.  
  1452.  
  1453. ΓòÉΓòÉΓòÉ 3.28. Query_system (Service 20) ΓòÉΓòÉΓòÉ
  1454.  
  1455. Syntax: 
  1456.  
  1457.  
  1458.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇsysdata = RexHLLAPI('Query_system')ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1459.  
  1460. Purpose: 
  1461.  
  1462. Returns a 35 byte system configuration string or '' if an error occurred. The 
  1463.  
  1464. Prerequisite Calls: 
  1465.  
  1466. None 
  1467.  
  1468. Arguments: 
  1469.  
  1470.  argument 1     The string constant or a variable whose contents are 
  1471.                 'Query_System'. 
  1472.  
  1473.  Returns: 
  1474.  
  1475.  The system status data string is returned. 
  1476.  
  1477.  ''        Error. Check the value of the REXX variable HLLAPIRETC. 
  1478.  
  1479.  sysdata   35 bytes layed out as follows: 
  1480.  
  1481.     o 1 byte EHLLAPI version (ASCII) 
  1482.     o 2 byte EHLLAPI level (ASCII) 
  1483.     o 6 bytes MMDDYY EHLLAPI date (ASCII) 
  1484.     o 3 bytes of not used data 
  1485.     o 1 byte hardware base, 'Z' means look at system bytes later, 'U' means 
  1486.       unable to determine, system bytes not valid 
  1487.     o 1 byte of 'X' 
  1488.     o 2 byte binary (stored in normal Intel reverse order) sequence number 
  1489.     o 2 bytes (ASCII) of the control program number 
  1490.     o 1 byte of '1' 
  1491.     o 4 byte ASCII Extended Error code 1 
  1492.     o 4 byte ASCII Extended Error code 2 
  1493.     o 2 byte binary (stored in normal Intel reverse order) of the  hardware 
  1494.       base and sub-model types 
  1495.  
  1496.        x'FC00' 6 mhz AT 
  1497.        x'FC01' 8 mhz AT 
  1498.        x'FC02' XT 286 
  1499.        x'FC04' PS/2 Model 50 
  1500.        x'FC05' PS/2 Model 60 
  1501.        x'F800' PS/2 Model 80 
  1502.        x'F801' PS/2 Model 70 
  1503.  
  1504.     o 2 byte binary (stored in standard Intel reverse order) of the PC code 
  1505.       page being used 
  1506.     o 1 byte value identifying the display type being used 
  1507.  
  1508.        'C'  CGA 
  1509.        'E'  EGA 
  1510.        'V'  VGA 
  1511.        'H'  8514 
  1512.        'A'  8503 
  1513.        'U'  Unknown 
  1514.  
  1515.     o 3 bytes reserved and unused 
  1516.  
  1517.  
  1518. ΓòÉΓòÉΓòÉ 3.29. Query_Window_Coords (Service 103) ΓòÉΓòÉΓòÉ
  1519.  
  1520. Syntax: 
  1521.  
  1522.  
  1523.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇcoords = RexHLLAPI('Query_Window_Coords', session_id)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1524.  
  1525. Purpose: 
  1526.  
  1527. Returns the presentation space window coordinates. 
  1528.  
  1529. Prerequisite Calls: 
  1530.  
  1531. Connect_Window_Srvcs service 
  1532.  
  1533. Arguments: 
  1534.  
  1535.  argument 1     The string constant or a variable whose contents are 
  1536.                 'Query_Window_Coords'. 
  1537.  
  1538.  session_id     The short name for the presentation space to query 
  1539.  
  1540.  Returns: 
  1541.  
  1542.  The window coordinates data string is returned. 
  1543.  
  1544.  ''        Not connected to a session. Check the value of the REXX variable 
  1545.            HLLAPIRETC. 
  1546.  
  1547.  coords    17 bytes data containing the window coordinates data. Refer to the 
  1548.            IBM Operation System/2 Extended Edition Version 1.2 EHLLAPI 
  1549.            Programming Reference for more information on the layout of this 
  1550.            data. 
  1551.  
  1552.  
  1553. ΓòÉΓòÉΓòÉ 3.30. Receive_File (Service 91) ΓòÉΓòÉΓòÉ
  1554.  
  1555. Syntax: 
  1556.  
  1557.  
  1558.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Receive_File', stringΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1559.  
  1560. Purpose: 
  1561.  
  1562. Executes the 'RECEIVE.EXE' program as if it had been entered at the command 
  1563. line. The contents of string must be an acceptable syntax for the receive 
  1564. command. 
  1565.  
  1566. Prerequisite Calls: 
  1567.  
  1568. None 
  1569.  
  1570. Arguments: 
  1571.  
  1572.  argument 1     The string constant or a variable whose contents are 
  1573.                 'Receive_File'. 
  1574.  
  1575.  string         Command line string per the syntax from the OS/2 Command 
  1576.                 Reference 
  1577.  
  1578.  Returns: 
  1579.  
  1580.  Returns the return code from the RECEIVE program. Refer to the IBM Operating 
  1581.  System/2 Extended Edition Version 1.2 User's Guide Volume 2: Communications 
  1582.  Manager and LAN Requester manual for more information on the possible return 
  1583.  codes from this service. 
  1584.  
  1585.  Example: 
  1586.  
  1587.   ret = REXHLLAPI('Receive_File', 'c:\temp.pli temp.pli(xx) ascii crlf');
  1588.  
  1589.  
  1590. ΓòÉΓòÉΓòÉ 3.31. Release (Service 12) ΓòÉΓòÉΓòÉ
  1591.  
  1592. Syntax: 
  1593.  
  1594.  
  1595.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Release'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1596.  
  1597. Purpose: 
  1598.  
  1599. Unlock the connected display session keyboard for user use. 
  1600.  
  1601. Prerequisite Calls: 
  1602.  
  1603. Connect_PS service 
  1604.  
  1605. Arguments: 
  1606.  
  1607.  argument 1     The string constant or a variable whose contents are 'Release'. 
  1608.  
  1609.  Returns: 
  1610.  
  1611.  The return code from the Release EHLLAPI service is returned. 
  1612.  
  1613.  '0'       Released 
  1614.  
  1615.  '1'       Not connected 
  1616.  
  1617.  '9'       System error occurred 
  1618.  
  1619.  Note:  If you disconnect while the keyboard is locked (via Reserve service) 
  1620.  then a release will be done automatically. 
  1621.  
  1622.  
  1623. ΓòÉΓòÉΓòÉ 3.32. Reserve (Service 11) ΓòÉΓòÉΓòÉ
  1624.  
  1625. Syntax: 
  1626.  
  1627.  
  1628.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Reserve'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1629.  
  1630. Locks the keyboard of the currently connected session until either a Release or 
  1631. a Disconnect_PS is done. 
  1632.  
  1633. Prerequisite Calls: 
  1634.  
  1635. Connect_PS service 
  1636.  
  1637. Arguments: 
  1638.  
  1639.  argument 1     The string constant or a variable whose contents are 'Reserve'. 
  1640.  
  1641.  Returns: 
  1642.  
  1643.  The return code from the Reserve EHLLAPI service is returned. 
  1644.  
  1645.  '0'       Keyboard now locked 
  1646.  
  1647.  '1'       Not connected to a session 
  1648.  
  1649.  '5'       Not locked, session in input inhibit state 
  1650.  
  1651.  '9'       System error 
  1652.  
  1653.  
  1654. ΓòÉΓòÉΓòÉ 3.33. Reset_System (Service 21) ΓòÉΓòÉΓòÉ
  1655.  
  1656. Syntax: 
  1657.  
  1658.  
  1659.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Reset_System'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1660.  
  1661. Purpose: 
  1662.  
  1663. Resets the system parameters (set with Set_session_parms service) to their 
  1664. default state. 
  1665.  
  1666. Note:  Multiple processes may be using the same settings and ALL of them will 
  1667. be reset by this call. Use it with care. 
  1668.  
  1669. Prerequisite Calls: 
  1670.  
  1671. None 
  1672.  
  1673. Arguments: 
  1674.  
  1675.  argument 1     The string constant or a variable whose contents are 
  1676.                 'Reset_System'. 
  1677.  
  1678.  Returns: 
  1679.  
  1680.  The return code from the Reset_System EHLLAPI service is returned. 
  1681.  
  1682.  '0'       Ok 
  1683.  
  1684.  '9'       System error 
  1685.  
  1686.  
  1687. ΓòÉΓòÉΓòÉ 3.34. Search_Field (Service 30) ΓòÉΓòÉΓòÉ
  1688.  
  1689. Syntax: 
  1690.  
  1691.  
  1692.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇpos = RexHLLAPI('Search_field', string, pos)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1693.  
  1694. Purpose: 
  1695.  
  1696. Search the currently connected session's presentation space for a field 
  1697. containing the string string, starting at position pos. 
  1698.  
  1699. Prerequisite Calls: 
  1700.  
  1701. Connect_PS service 
  1702.  
  1703. Arguments: 
  1704.  
  1705.  argument 1     The string constant or a variable whose contents are 
  1706.                 'Search_field'. 
  1707.  
  1708.  string         The string to be search for. 
  1709.  
  1710.  pos            The start position within the presentation space for the search 
  1711.                 to begin. 
  1712.  
  1713.  Returns: 
  1714.  
  1715.  The position of the specified string is returned. 
  1716.  
  1717.  '0'       String not found or error 
  1718.  
  1719.  > '0'     Position within the presentation of the first location of string 
  1720.  
  1721.  
  1722. ΓòÉΓòÉΓòÉ 3.35. Search_PS (Service 6) ΓòÉΓòÉΓòÉ
  1723.  
  1724. Syntax: 
  1725.  
  1726.  
  1727.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇpos = RexHLLAPI('Search_PS', string, pos)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1728.  
  1729. Purpose: 
  1730.  
  1731. Search the currently connect session's presentation space for the string string 
  1732. starting at position pos. If SRCHALL has been specified in the 
  1733. Set_Session_parms (described later), then pos is not used. 
  1734.  
  1735. Prerequisite Calls: 
  1736.  
  1737. Connect_PS service 
  1738.  
  1739. Arguments: 
  1740.  
  1741.  argument 1     The string constant or a variable whose contents are 
  1742.                 'Search_PS'. 
  1743.  
  1744.  string         The string to be search for. 
  1745.  
  1746.  pos            The start position within the presentation space for the search 
  1747.                 to begin. 
  1748.  
  1749.  Returns: 
  1750.  
  1751.  The position of the specified string is returned. 
  1752.  
  1753.  '0'       String not found or error 
  1754.  
  1755.  > '0'     Position within the presentation of the first location of string 
  1756.  
  1757.  
  1758. ΓòÉΓòÉΓòÉ 3.36. Send_File (Service 90) ΓòÉΓòÉΓòÉ
  1759.  
  1760. Syntax: 
  1761.  
  1762.  
  1763.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Send_File', stringΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1764.  
  1765. Executes the 'SEND.EXE' program as if it had been entered at the command line. 
  1766. The contents of string must be an acceptable syntax for the send command. 
  1767.  
  1768. Prerequisite Calls: 
  1769.  
  1770. None 
  1771.  
  1772. Arguments: 
  1773.  
  1774.  argument 1     The string constant or a variable whose contents are 
  1775.                 'Send_File'. 
  1776.  
  1777.  string         Command line string per the syntax from the OS/2 Command 
  1778.                 Reference. 
  1779.  
  1780.  Returns: 
  1781.  
  1782.  Returns the return code from the SEND program. Refer to the IBM Operating 
  1783.  System/2 Extended Edition Version 1.2 User's Guide Volume 2: Communications 
  1784.  Manager and LAN Requester manual for more information on the possible return 
  1785.  codes from this service. 
  1786.  
  1787.  Example: 
  1788.  
  1789.   ret = REXHLLAPI('Send_File', 'c:\temp.pli temp.pli(xx) ascii crlf');
  1790.  
  1791.  
  1792. ΓòÉΓòÉΓòÉ 3.37. Sendkey (Service 3) ΓòÉΓòÉΓòÉ
  1793.  
  1794. Syntax: 
  1795.  
  1796.  
  1797.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Sendkey', stringΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1798.  
  1799. Purpose: 
  1800.  
  1801. Send the keys as defined by the contents of string. Up to total of 255 keys may 
  1802. be sent at a single time. 
  1803.  
  1804. Prerequisite Calls: 
  1805.  
  1806. Connect_PS service 
  1807.  
  1808. Arguments: 
  1809.  
  1810.  argument 1     The string constant or a variable whose contents are 'Sendkey'. 
  1811.  
  1812.  string         The string of characters to be sent to the currently connected 
  1813.                 presentation space. This string can include the AID key 
  1814.                 mnemonics. Some of the more common AID key mnemonics are: 
  1815.  
  1816.     '@E'    Enter 
  1817.     '@C'    Clear 
  1818.     '@n'    PF1 through PF9 where n are the characters '1' through '9'. For a 
  1819.             complete list of all AID key mnemonics refer to the IBM Operating 
  1820.             System/2 Extended Edition Version 1.2 EHLLAPI Programming Reference 
  1821.             manual. 
  1822.  
  1823.             AID key mnemonics are case sensitive. 
  1824.  
  1825.  Returns: 
  1826.  
  1827.  The return code from the Sendkey EHLLAPI service is returned. 
  1828.  
  1829.  '0'       Keystrokes sent 
  1830.  
  1831.  '1'       Not connected to a session 
  1832.  
  1833.  '2'       Incorrect parameter 
  1834.  
  1835.  '4'       Session busy, all keystrokes not sent 
  1836.  
  1837.  '5'       Session is in input inhibit state or invalid mnemonic sent 
  1838.  
  1839.  '9'       System error occurred 
  1840.  
  1841.  Example: 
  1842.  
  1843.  The following example 
  1844.  
  1845.   call REXHLLAPI 'Sendkey', '@E'
  1846.  
  1847.  will send the AID key Enter to the currently connected presentation space. 
  1848.  
  1849.  
  1850. ΓòÉΓòÉΓòÉ 3.38. Set_Cursor (Service 40) ΓòÉΓòÉΓòÉ
  1851.  
  1852. Syntax: 
  1853.  
  1854.  
  1855.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Set_Cursor', posΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1856.  
  1857. Purpose: 
  1858.  
  1859. Positions the cursor at position pos in the currently connected session. 
  1860.  
  1861. Prerequisite Calls: 
  1862.  
  1863. Connect_PS service 
  1864.  
  1865. Arguments: 
  1866.  
  1867.  argument 1     The string constant or a variable whose contents are 
  1868.                 'Set_Cursor'. 
  1869.  
  1870.  pos            The position in the currently connected presentation space in 
  1871.                 which to place the cursor. 
  1872.  
  1873.  Returns: 
  1874.  
  1875.  The return code from the Set_Cursor EHLLAPI service is returned. 
  1876.  
  1877.  '0'       Ok 
  1878.  
  1879.  '1'       Not connected to a session 
  1880.  
  1881.  '4'       Session busy, all keystrokes not sent 
  1882.  
  1883.  '7'       pos in invalid for the current presentation space 
  1884.  
  1885.  '9'       System error occurred 
  1886.  
  1887.  
  1888. ΓòÉΓòÉΓòÉ 3.39. Set_Session_Parms (Service 9) ΓòÉΓòÉΓòÉ
  1889.  
  1890. Syntax: 
  1891.  
  1892.  
  1893.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Set_Session_parms', stringΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1894.  
  1895. Purpose: 
  1896.  
  1897. Sets the current session parameters from string. 
  1898.  
  1899. Prerequisite Calls: 
  1900.  
  1901. None 
  1902.  
  1903. Arguments: 
  1904.  
  1905.  argument 1     The string constant or a variable whose contents are 
  1906.                 'Set_Session_parms'. 
  1907.  
  1908.  string         The session parameter string. The values of the session 
  1909.                 parameters are ASCII strings and are as follows: 
  1910.  
  1911.     'ATTRB'               on read_PS calls, pass back ONLY the attributes of 
  1912.                           the read string 
  1913.     'NOATTR'*             pass back only the ASCII text in the read string 
  1914.     'EAB'                 pass back extended attributes AND text in the read 
  1915.                           string 
  1916.     'NOEAB'*              pass back only text in the read string 
  1917.     'XLATE'               translate EABs to PC attribute values in the read 
  1918.                           string 
  1919.     'NOXLATE'*            do not translate EABs to PC attribute values in the 
  1920.                           read string 
  1921.     'CONPHYS'             connect to the physical session, and if required, 
  1922.                           jump to it. 
  1923.     'CONLOG'*             connect to the logical session requested, do not jump 
  1924.                           to it 
  1925.     'ESC=n'               set the keystroke mnemonic character to n, default 
  1926.                           '@' 
  1927.     'SRCHALL'*            Search the entire presentation space when doing 
  1928.                           searches 
  1929.     'SRCHFROM'            search ONLY from the specified position when doing 
  1930.                           searches 
  1931.     'SRCHFRWD'*           search from the beginning to the end of the PS 
  1932.                           (forward direction) 
  1933.     'SRCHBKWD'            search from the end of the PS to the beginning 
  1934.                           (backward direction) 
  1935.     'AUTORESET'*          will attempt to reset all inhibit conditions 
  1936.                           automatically on sendkey requests 
  1937.     'NORESET'             no reset will be attempted automatically 
  1938.     'TWAIT'*              WAIT will wait up to one minute for XCLOCK or XSYSTEM 
  1939.                           to clear before timing out 
  1940.     'LWAIT'               WAIT will wait until XCLOCK or XSYSTEM clear before 
  1941.                           returning 
  1942.  
  1943.                           Note:  This option should be used with EXTREME 
  1944.                           caution as control will NOT return until the host is 
  1945.                           available 
  1946.     'NWAIT'               no wait, return status on any WAIT calls 
  1947.     'FPAUSE'*             Full pause will take place regardless of any 
  1948.                           Start_host_notify in effect. 
  1949.     'IPAUSE'              Interruptible pause. If a pause is in progress, and a 
  1950.                           host event occurs while Start_host_notify is in 
  1951.                           effect, this pause will end. 
  1952.  
  1953.                           Note:  '*' denotes the default value for this 
  1954.                           setting. 
  1955.  
  1956.                           Please note that the session parameters STRLEN and 
  1957.                           STREOT are not included in the list above. These 
  1958.                           values cannot be changed through the REXHLAPI 
  1959.                           function package. 
  1960.  
  1961.                           More than one parameter may be set with a single 
  1962.                           service call. Seperate multiple parameters with one 
  1963.                           or more spaces. 
  1964.  
  1965.  Returns: 
  1966.  
  1967.  The return code from the Set_Session_parms EHLLAPI service is returned. 
  1968.  
  1969.  '0'       Session parameters set 
  1970.  
  1971.  '2'       Parameter string too long, or parameter error 
  1972.  
  1973.  '9'       System error 
  1974.  
  1975.  Example: 
  1976.  
  1977.  The following example 
  1978.  
  1979.   call REXHLLAPI 'SetSession_Parms', 'NORESET IPAUSE'
  1980.  
  1981.  will set the specified session parameters. 
  1982.  
  1983.  
  1984. ΓòÉΓòÉΓòÉ 3.40. Start_Close_Intercept (Service 41) ΓòÉΓòÉΓòÉ
  1985.  
  1986. Syntax: 
  1987.  
  1988.  
  1989.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Set_Close_Intercept', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1990.  
  1991. Purpose: 
  1992.  
  1993. Allows the application to intercept close requests when the user selects the 
  1994. close option from the presentation space's window. 
  1995.  
  1996. Prerequisite Calls: 
  1997.  
  1998. None 
  1999.  
  2000. Arguments: 
  2001.  
  2002.  argument 1     The string constant or a variable whose contents are 
  2003.                 'Start_Close_Intercept'. 
  2004.  
  2005.  session_id     The short session name for the presentation space to begin 
  2006.                 trapping close requests. 
  2007.  
  2008.  Returns: 
  2009.  
  2010.  The return code from the Start_Close_Intercept EHLLAPI service is returned. 
  2011.  
  2012.  '0'       Ok 
  2013.  
  2014.  '1'       Invalid session_id 
  2015.  
  2016.  '2'       Parameter string error 
  2017.  
  2018.  '9'       System error 
  2019.  
  2020.  '10'      Function not supported 
  2021.  
  2022.  
  2023. ΓòÉΓòÉΓòÉ 3.41. Start_Host_Notify (Service 23) ΓòÉΓòÉΓòÉ
  2024.  
  2025. Syntax: 
  2026.  
  2027.  
  2028.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Start_Host_Notify', session_id, optionΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2029.  
  2030. Purpose: 
  2031.  
  2032. Starts trapping of host session screen update events. The session specified by 
  2033. session_id will be monitored for changes as requested by option. 
  2034.  
  2035. Prerequisite Calls: 
  2036.  
  2037. None 
  2038.  
  2039. Arguments: 
  2040.  
  2041.  argument 1     The string constant or a variable whose contents are 
  2042.                 'Start_Host_Notify'. 
  2043.  
  2044.  session_id     The short session name for the presentation space to begin 
  2045.                 trapping screen update events. 
  2046.  
  2047.  option         Type of event trapping to begin. The valid values for option 
  2048.                 are as follows: 
  2049.  
  2050.     'P'  Screen changes only 
  2051.  
  2052.     'O'  OIA changes only 
  2053.  
  2054.     'B'  Both OIA and screen changes 
  2055.  
  2056.  Returns: 
  2057.  
  2058.  The return code from the Start_Host_Notify EHLLAPI service is returned. 
  2059.  
  2060.  '0'       Ok 
  2061.  
  2062.  '1'       Invalid session_id 
  2063.  
  2064.  '2'       Parameter string error 
  2065.  
  2066.  '9'       System error 
  2067.  
  2068.  
  2069. ΓòÉΓòÉΓòÉ 3.42. Start_Key_Intercept (Service 50) ΓòÉΓòÉΓòÉ
  2070.  
  2071. Syntax: 
  2072.  
  2073.  
  2074.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Start_Key_Intercept', session_id, optionΓöÇΓöÇΓöÇΓöÇ
  2075.  
  2076. Purpose: 
  2077.  
  2078. All keystrokes to the session specified by session_id will be buffered for 
  2079. processing by the Get_key service. 
  2080.  
  2081. Prerequisite Calls: 
  2082.  
  2083. None 
  2084.  
  2085. Arguments: 
  2086.  
  2087.  argument 1     The string constant or a variable whose contents are 
  2088.                 'Start_Key_Intercept'. 
  2089.  
  2090.  session_id     The short session name for the presentation space to begin 
  2091.                 trapping keystrokes. 
  2092.  
  2093.  option         option can be either of the following 
  2094.  
  2095.     'D'  AID keys only 
  2096.     'L'  All keystroke 
  2097.  
  2098.  Returns: 
  2099.  
  2100.  The return code from the Start_Key_Intercept EHLLAPI service is returned. 
  2101.  
  2102.  '0'       Ok, monitoring started 
  2103.  
  2104.  '1'       Not connected to a session 
  2105.  
  2106.  '2'       Option was not correct 
  2107.  
  2108.  '4'       Session busy and cannot be connected 
  2109.  
  2110.  '9'       System error 
  2111.  
  2112.  
  2113. ΓòÉΓòÉΓòÉ 3.43. Stop_Close_Intercept (Service 43) ΓòÉΓòÉΓòÉ
  2114.  
  2115. Syntax: 
  2116.  
  2117.  
  2118.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Stop_Close_Intercept', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2119.  
  2120. Purpose: 
  2121.  
  2122. Ends trapping of host session session_id close requests. 
  2123.  
  2124. Prerequisite Calls: 
  2125.  
  2126. Start_Close_Intercept service 
  2127.  
  2128. Arguments: 
  2129.  
  2130.  argument 1     The string constant or a variable whose contents are 
  2131.                 'Stop_Close_Intercept'. 
  2132.  
  2133.  session_id     The short session name for the presentation space to stop 
  2134.                 trapping close requests. 
  2135.  
  2136.  Returns: 
  2137.  
  2138.  The return code from the Stop_Close_Intercept EHLLAPI service is returned. 
  2139.  
  2140.  '0'       Ok, monitoring ended 
  2141.  
  2142.  '1'       Not connected to a session 
  2143.  
  2144.  '2'       Parameter error 
  2145.  
  2146.  '8'       No prior Start_Close_Intercept was done 
  2147.  
  2148.  '9'       System error 
  2149.  
  2150.  '12'      Session stopped 
  2151.  
  2152.  
  2153. ΓòÉΓòÉΓòÉ 3.44. Stop_Host_Notify (Service 25) ΓòÉΓòÉΓòÉ
  2154.  
  2155. Syntax: 
  2156.  
  2157.  
  2158.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Stop_Host_Notify', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2159.  
  2160. Purpose: 
  2161.  
  2162. Ends trapping of host session session_id screen update events started by a 
  2163. preceding Start_Host_Notify service. 
  2164.  
  2165. Prerequisite Calls: 
  2166.  
  2167. Start_Host_Notify service 
  2168.  
  2169. Arguments: 
  2170.  
  2171.  argument 1     The string constant or a variable whose contents are 
  2172.                 'Stop_Host_Notify'. 
  2173.  
  2174.  session_id     The short session name for the presentation space to stop 
  2175.                 trapping screen and OIA updates. 
  2176.  
  2177.  Returns: 
  2178.  
  2179.  The return code from the Stop_Host_Notify EHLLAPI service is returned. 
  2180.  
  2181.  '0'       Ok, monitoring ended 
  2182.  
  2183.  '1'       Not connected to a session 
  2184.  
  2185.  '8'       No prior Start_Host_Notify was done 
  2186.  
  2187.  '9'       System error 
  2188.  
  2189.  
  2190. ΓòÉΓòÉΓòÉ 3.45. Stop_Key_Intercept (Service 53) ΓòÉΓòÉΓòÉ
  2191.  
  2192. Syntax: 
  2193.  
  2194.  
  2195.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Stop_Key_Intercept', session_idΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2196.  
  2197. Purpose: 
  2198.  
  2199. Ends trapping of keystrokes for session_id started by a preceding 
  2200. Start_Keystroke_Interecpt service. 
  2201.  
  2202. Prerequisite Calls: 
  2203.  
  2204. Start_Key_Intercept service 
  2205.  
  2206. Arguments: 
  2207.  
  2208.  argument 1     The string constant or a variable whose contents are 
  2209.                 'Stop_Key_intercept'. 
  2210.  
  2211.  session_id     The short session name for the presentation space to stop 
  2212.                 trapping keystrokes. 
  2213.  
  2214.  Returns: 
  2215.  
  2216.  The return code from the Stop_Key_Intercept EHLLAPI service is returned. 
  2217.  
  2218.  '0'       Ok, intercept ended 
  2219.  
  2220.  '1'       Not connected to a session 
  2221.  
  2222.  '8'       No prior Start_Keystroke_Intercept was done 
  2223.  
  2224.  '9'       System error 
  2225.  
  2226.  
  2227. ΓòÉΓòÉΓòÉ 3.46. Wait (Service 4) ΓòÉΓòÉΓòÉ
  2228.  
  2229. Syntax: 
  2230.  
  2231.  
  2232.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexHLLAPI 'Wait'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2233.  
  2234. Purpose: 
  2235.  
  2236. Will check the status of the currently connected session. The setting (set by 
  2237. the Set_session_parms service) of TWAIT, NWAIT ot LWAIT affects how long this 
  2238. function will wait. 
  2239.  
  2240. Prerequisite Calls: 
  2241.  
  2242. Connect_PS service 
  2243.  
  2244. Arguments: 
  2245.  
  2246.  argument 1     The string constant or a variable whose contents are 'Wait'. 
  2247.  
  2248.  Returns: 
  2249.  
  2250.  The return code from the Wait EHLLAPI service is returned. 
  2251.  
  2252.  '0'       Keyboard unlocked and ready for keystrokes 
  2253.  
  2254.  '1'       Not connected to a session 
  2255.  
  2256.  '4'       Wait timed out while still in XCLOCK or XSYSTEM state 
  2257.  
  2258.  '5'       Keyboard locked 
  2259.  
  2260.  '9'       System error 
  2261.  
  2262.  
  2263. ΓòÉΓòÉΓòÉ 4. Sample REXX Cmd using REXHLLAPI DLL Function Package ΓòÉΓòÉΓòÉ
  2264.  
  2265. The REXTEST3.CMD supplied on this distribution disk performs the following 
  2266. functions: 
  2267.  
  2268.  o Requests session information from Communications Manager. 
  2269.  o Searches for an unused session. 
  2270.  o Logs on to TSO. 
  2271.  o Downloads a file to the c: drive. 
  2272.  o Logs off TSO. 
  2273.  
  2274.  Because all TSO/MVS/VTAM systems are different you may have to alter some of 
  2275.  the search strings for your particular system. Be sure to set the USERID and 
  2276.  PASSWORD variables to your TSO id and password. 
  2277.  
  2278.  
  2279. ΓòÉΓòÉΓòÉ 5. Support of REXHLAPI DLL Function Package ΓòÉΓòÉΓòÉ
  2280.  
  2281. Support and enhancements for REXHLAPI will be performed by the author on an "as 
  2282. time permits" basis. If you have questions, comments or suggestions on 
  2283. improvements the author can be reached through the OS/2 Shareware BBS 
  2284. (703-385-4325) or at the address below: 
  2285.  
  2286.  W. David Ashley 
  2287.  5 Timberline Dr. 
  2288.  Trophy Club, Tx 76262 
  2289.