═══ 1. Overview ═══ The Rexxbase Macro package is a VXRexx Macro which adds the Rexxbase functions to the Insert Code function of VXRexx to develop Rexxbase based programs faster and easier. The macro asks you for the several arguments or values, which are required by the chosen Rexxbase function or Control Variable. ═══ 1.1. Author ═══ RexxBase Macor For VXRexx Author Stefan Dietz Address: Struempfelbacher Str. 240 City: Weinstadt Postal Code: 71348 Country: Germany E-Mail Id: sdietz@aragon.bb.bawue.de ═══ 2. Installation ═══ To install the Rexxbase Macro Package, simply copy the files REXXBASE.VRM, REXXBASE.VRW, REXXBASE.MTC and REXXBASE.ICO into the \SYSTEM directory of your VXRexx path. In general, this is the path x:\VXREXX\SYSTEM Editor's note: if this doesn't work, it might be the MACRO subdirectory. After doing that, VXRexx will initialize the Rexxbase macro at its next startup. ═══ 3. Using the Macro ═══ The following chapters explain, how to use the macro. ═══ 3.1. General Information ═══ As I explained before, the Macro is useful for developing programs, which are based on Rexxbase. If you want to insert a Rexxbase function code, you can do this like inserting general VXRexx code. You have to call the Insert Code... function of VXRexx. Within the Insert Code... window there will be a line called "RexxBase". Now, you can select a Rexxbase function by double clicking on the description of the function. ═══ 3.2. Inserting a Rexxbase function ═══ The Rexxbase functions are in the first part of the list. If you choose one of them, the Rexxbase macro will ask you for the required parameters of the function and you also have to specify, whether Rexxbase macro should qoute the string, or not. If you choose the Rexxbase function 'rexxbase_FindRec', you will be asked if you want Rexxbase to do an EXACT search or not. In this example, the user has chosen the function 'rexxbase_ OpenDBF', and he now has to specify the parameter 'Database Name' so that the Rexxbase macro knows, which database name it has to set in the codeline. If the user wants to, he can set several indices, which will be loaded with the given Database. After setting these parameters, you have to start the Insert Code function by pressing the OK-button. The Rexxbase macro will now add the needed code into the VXRexx code script at the current cursor position. ═══ 3.3. Setting/Getting a control variable ═══ If you select a control variable from the Insert Code... function list, the Rexxbase macro will give you a multiple choice list of all possible control variable values. The default value will be emphasized automatically. If you have selected the 'Get the internal error string' item, the macro will insert the required code line without asking for arguments, because this control variable does not need any. The same will appear when the items 'Initialize Rexxbase functions' (rxfuncadd...), 'Drop all Rexxbase functions' (rexxbase_shutdown) and 'Close all opened Databases' (rexxbase_closealldbf) are selected. ═══ 4. Modifying the function database ═══ If you want to upgrade the macro function list (--> the file REXXBASE.MTC), you simply have to insert a line with special details of your new function in the file REXXBASE.MTC (or respectively change any existing line). The added line for a new function should contain the following details: RexxBase;Function Description;Functionname_Functiontype_argument1_argument2_argument3_argument4;MacroFileName For example, the new function is 'rexxbase_NEWFUNC( DatabaseName, Para1, Para2 )' RexxBase;My new Function;NewFunc_GenFunc_Dbase Name_Para 1_Para 2_-;RXBASMAC Description: Rexxbase; Name of the main entry in the Insert Code window (Do not change!) My new function; Description of the new function. It is shown in the Insert Code window. NewFunc Function Name, which is used in the rexxbase dll. In this case, the rexxbase function would be 'rexxbase_NEWFUNC'. GenFunc This Parameter determines, whether the Rexxbase macro has to generate a Rexxbase function code line or a Setting/Getting control variable line. 'GenFunc' means, that the code is a function, 'SetContVar' means, that the code is a Control variable. Dbase Name This is the first argument of the Rexxbase function. Para 1 This is the second argument of the Rexxbase function. Para 2, 3... The arguments of the Rexxbase function are separated by an underscore ('_'). They can consist of more than one word. The Rexxbase macro will show the argument the same way, which it is defined here. If there is no argument, you have to set a hyphen instead. If the macro has to set a control variable, the line in the function data- base should look like the following one: RexxBase;Control Variable Description;ControlVarName_FunctionType_Value1_Value2_Value3_Value4;MacroFileName For example, the Control Variable is rexxbase.NewControl with the Values 'Red', 'Green' and 'Blue'. RexxBase;Set the rexxbase.NEWCONTROL value;NewControl_SetContVar_RED_GREEN_BLUE_-;RXBASMAC Description: Rexxbase; Name of the main entry in the Insert Code window (Do not change!) Set the rexxbase.NEWCONTROL value; Description of the new Control Variable. It is shown in the Insert Code window. NewControl Control Variable Name, which is used in the rexxbase dll. In this case, the rexxbase control variable would be 'rexxbase.NEWCONTROL'. SetContVar This Parameter determines, whether the Rexxbase macro has to generate a Rexxbase function code line or a Setting/Getting control variable line. 'GenFunc' means, that the code is a function, 'SetContVar' means, that the code is a Control variable. RED This is the first value of the Rexxbase function. Additionally it is the DEFAULT value GREEN This is the second value of the Rexxbase function. BLUE This is the last value of the function... The values of the Rexxbase Control Variables are separated by an under- score ('_'). They can consist of more than one word. The macro will show the values like this: 'Value: NEWCONTROL'. If there are no more values, you have to set a hyphen instead.