home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxbas223.zip / rxbasmac.INF (.txt) < prev    next >
OS/2 Help File  |  1995-10-08  |  31KB  |  171 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Overview ΓòÉΓòÉΓòÉ
  3.  
  4.  The Rexxbase Macro package is a VXRexx Macro which adds the Rexxbase functions 
  5. to the Insert Code function of VXRexx to develop Rexxbase based programs faster 
  6. and easier. The macro asks you for the several arguments or values, which are 
  7. required by the chosen Rexxbase function or Control Variable. 
  8.  
  9.  
  10. ΓòÉΓòÉΓòÉ 1.1. Author ΓòÉΓòÉΓòÉ
  11.  
  12.  RexxBase Macor For VXRexx 
  13.  
  14.  Author Stefan Dietz 
  15.  
  16.  Address: Struempfelbacher Str. 240 
  17.  
  18.  City: Weinstadt 
  19.  
  20.  Postal Code: 71348 
  21.  
  22.  Country: Germany 
  23.  
  24.  E-Mail Id: sdietz@aragon.bb.bawue.de 
  25.  
  26.  
  27. ΓòÉΓòÉΓòÉ 2. Installation ΓòÉΓòÉΓòÉ
  28.  
  29. To install the Rexxbase Macro Package, simply copy the files REXXBASE.VRM, 
  30. REXXBASE.VRW, REXXBASE.MTC and REXXBASE.ICO into the \SYSTEM directory of your 
  31. VXRexx path. In general, this is the path x:\VXREXX\SYSTEM Editor's note: if 
  32. this doesn't work, it might be the MACRO subdirectory. After doing that, VXRexx 
  33. will initialize the Rexxbase macro at its next startup. 
  34.  
  35.  
  36. ΓòÉΓòÉΓòÉ 3. Using the Macro ΓòÉΓòÉΓòÉ
  37.  
  38. The following chapters explain, how to use the macro. 
  39.  
  40.  
  41. ΓòÉΓòÉΓòÉ 3.1. General Information ΓòÉΓòÉΓòÉ
  42.  
  43. As I explained before, the Macro is useful for developing programs, which are 
  44. based on Rexxbase. If you want to insert a Rexxbase function code, you can do 
  45. this like inserting general VXRexx code. You have to call the Insert Code... 
  46. function of VXRexx. Within the Insert Code... window there will be a line 
  47. called "RexxBase". Now, you can select a Rexxbase function by double clicking 
  48. on the description of the function. 
  49.  
  50.  
  51. ΓòÉΓòÉΓòÉ 3.2. Inserting a Rexxbase function ΓòÉΓòÉΓòÉ
  52.  
  53. The Rexxbase functions are in the first part of the list. If you choose one of 
  54. them, the Rexxbase macro will ask you for the required parameters of the 
  55. function and you also have to specify, whether Rexxbase macro should qoute the 
  56. string, or not. If you choose the Rexxbase function 'rexxbase_FindRec', you 
  57. will be asked if you want Rexxbase to do an EXACT search or not. 
  58.  
  59. In this example, the user has chosen the function 'rexxbase_ OpenDBF', and he 
  60. now has to specify the parameter 'Database Name' so that the Rexxbase macro 
  61. knows, which database name it has to set in the codeline. If the user wants to, 
  62. he can set several indices, which will be loaded with the given Database. After 
  63. setting these parameters, you have to start the Insert Code function by 
  64. pressing the OK-button.  The Rexxbase macro will now add the needed code into 
  65. the VXRexx code script at the current cursor position. 
  66.  
  67.  
  68. ΓòÉΓòÉΓòÉ 3.3. Setting/Getting a control variable ΓòÉΓòÉΓòÉ
  69.  
  70. If you select a control variable from the Insert Code... function list, the 
  71. Rexxbase macro will give you a multiple choice list of all possible control 
  72. variable values. The default value will be emphasized automatically.  If you 
  73. have selected the 'Get the internal error string' item, the macro will insert 
  74. the required code line without asking for arguments, because this control 
  75. variable does not need any.  The same will appear when the items 'Initialize 
  76. Rexxbase functions' (rxfuncadd...), 'Drop all Rexxbase functions' 
  77. (rexxbase_shutdown) and 'Close all opened Databases' (rexxbase_closealldbf) are 
  78. selected. 
  79.  
  80.  
  81. ΓòÉΓòÉΓòÉ 4. Modifying the function database ΓòÉΓòÉΓòÉ
  82.  
  83.  If you want to upgrade the macro function list (--> the file REXXBASE.MTC), 
  84. you simply have to insert a line with special details of your new function in 
  85. the file REXXBASE.MTC (or respectively change any existing line). 
  86.  
  87.  The added line for a new function should contain the following details: 
  88. RexxBase;Function 
  89. Description;Functionname_Functiontype_argument1_argument2_argument3_argument4;MacroFileName 
  90.  
  91. For example, the new function is 'rexxbase_NEWFUNC( DatabaseName, Para1, Para2 
  92. )' 
  93.  
  94. RexxBase;My new Function;NewFunc_GenFunc_Dbase Name_Para 1_Para 2_-;RXBASMAC
  95.  
  96. Description: 
  97.  
  98.  Rexxbase; 
  99.          Name of the main entry in the Insert Code window (Do not change!) 
  100.  
  101.  My new function; 
  102.          Description of the new function. It is shown in the Insert Code 
  103.         window. 
  104.  
  105.  NewFunc 
  106.          Function Name, which is used in the rexxbase dll. In this case, the 
  107.         rexxbase function would be 'rexxbase_NEWFUNC'. 
  108.  
  109.  GenFunc 
  110.          This Parameter determines, whether the Rexxbase macro has to generate 
  111.         a Rexxbase function code line or a Setting/Getting control variable 
  112.         line. 'GenFunc' means, that the code is a function, 'SetContVar' means, 
  113.         that the code is a Control variable. 
  114.  
  115.  Dbase Name 
  116.          This is the first argument of the Rexxbase function. 
  117.  
  118.  Para 1 
  119.          This is the second argument of the Rexxbase function. 
  120.  
  121.  Para 2, 3... 
  122.  
  123. The arguments of the Rexxbase function are separated by an underscore ('_'). 
  124. They can consist of more than one word. The Rexxbase macro will show the 
  125. argument the same way, which it is defined here. If there is no argument, you 
  126. have to set a hyphen instead. 
  127.  
  128. If the macro has to set a control variable, the line in the function data- base 
  129. should look like the following one: 
  130.  
  131. RexxBase;Control Variable 
  132. Description;ControlVarName_FunctionType_Value1_Value2_Value3_Value4;MacroFileName 
  133.  
  134. For example, the Control Variable is rexxbase.NewControl with the Values 'Red', 
  135. 'Green' and 'Blue'. 
  136.  
  137. RexxBase;Set the rexxbase.NEWCONTROL value;NewControl_SetContVar_RED_GREEN_BLUE_-;RXBASMAC
  138.  
  139. Description: 
  140.  
  141.  Rexxbase; 
  142.          Name of the main entry in the Insert Code window (Do not change!) 
  143.  
  144.  Set the rexxbase.NEWCONTROL value; 
  145.          Description of the new Control Variable. It is shown in the Insert 
  146.         Code window. 
  147.  
  148.  NewControl 
  149.          Control Variable Name, which is used in the rexxbase dll. In this 
  150.         case, the rexxbase control variable would be 'rexxbase.NEWCONTROL'. 
  151.  
  152.  SetContVar 
  153.          This Parameter determines, whether the Rexxbase macro has to generate 
  154.         a Rexxbase function code line or a Setting/Getting control variable 
  155.         line. 'GenFunc' means, that the code is a function, 'SetContVar' means, 
  156.         that the code is a Control variable. 
  157.  
  158.  RED 
  159.          This is the first value of the Rexxbase function. Additionally it is 
  160.         the DEFAULT value 
  161.  
  162.  GREEN 
  163.          This is the second value of the Rexxbase function. 
  164.  
  165.  BLUE 
  166.          This is the last value of the function... 
  167.  
  168. The values of the Rexxbase Control Variables are separated by an under- score 
  169. ('_'). They can consist of more than one word. The macro will show the values 
  170. like this: 'Value: NEWCONTROL'. If there are no more values, you have to set a 
  171. hyphen instead.