═══ 1. Copyrights ═══ Copyright (c) Virtual Objects Software 1995 Author Vitaly Gumirov Also this document containes the following trademarks: OS/2, EPM, SOM, REXX, and ObjectREXX are trademarks of IBM Corp. Lotus 123, 123G and Datalence are trademarks of Lotus Development. ═══ 2. Introduction and general concepts ═══ The REXX is a quite simple and nice language. It is very simple to learn to write not complex programs on it. Therefore, many OS/2 programs use it a macro language. For example, Enhanced Editor (EPM), which is located in OS/2 system/Productivity Folder allows user to write scripts to perform more complex word processing functions then one can do using menus. Moreover, the power of the REXX could be extended by loading additional libraries of functions written in C/C++. There exist many useful REXX libraries which could be found over the net. I've been very surprised when I've found that the OS/2 version of the world's best known spreadsheet Lotus 123 does not allow to use REXX as a scripting language. So, 'cause one our client will have a need to use Lotus 123G in the client server environment to process some data from the object database having no Datalence drivers for it. So, we have got to write some Lotus 123G interface for this database. We have known that the above object database will have an ObjectREXX interface (more exactly SOM interface ;-). Therefore, we have decided to build SOM interface classes for Lotus 123G. The interfaces of this classes are included in this package. They could be directly used from ObjectREXX programs. But some testing shows us that the current beta of ObjectREXX could not be generally used as a macro language for 123G. The loading time of the ObjectREXX interpreter on the 486DX2 machine with 8M RAM is not, imho, suitable for this purpose. Therefore, the decision to build the API for an ordinary REXX has been made. Now about this guide. If you're planning to use RXLEPSOM package in an ordinary REXX environment you will need no to read the chapter 4 related to the ObjectREXX and SOM interfaces. Thus in this case after reading the chapters 1, 2 and 3 you should go directly to the chapter 5. ═══ 3. Packaging ═══ This package includes the following files ┌──────────────┬───────────────────────────────────────────────────────────┐ │ 123REXX.DLL │ macro library for Lotus 123G, it should be pointed │ │ │ by the {library-attach} macro; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ LEPSOM.DLL │ DLL containing SOM interface classes for Lotus 123G, it│ │ │ should be placed somewhere in your LIBPATH; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ RXLEPSOM.DLL │ DLL containing REXX interface to SOM the above SOM │ │ │ classes it should be placed somewhere in your LIBPATH; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ LEPSOM.IR │ Interface Repository database, you will need it only if │ │ │ you are going to use ObjectREXX with 123G, in this case │ │ │ it should be added to the SOMIR environment variable in │ │ │ your CONFIG.SYS; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ *.CMD │ sample REXX macro files for Lotus 123G; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ *.ORX │ sample ObjectREXX macro files for Lotus 123G; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ *.WG2 │ │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ LEPRXMM.INI │ the profile file, containing sample macro definitions; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ RXLEPSOM.DOC │ this documentation file; │ ├──────────────┼───────────────────────────────────────────────────────────┤ │ RXLEPSOM.INF │ the on-line version of this documentation; │ └──────────────┴───────────────────────────────────────────────────────────┘ ═══ 4. How to register ═══ The RXLEPSOM package is a copyrighted software owned by Virtual Objects Software. This is the demo beta version of the RXLEPSOM package. It displays the special message box every 5th REXX macro call. The full featured version which costs $60+shippment has no such restriction. We are glad to here from you about all errors and inconviniences you'll find from using this product. Moreover, if you'll find this product useful for you and decide to get the full featured copy of this product, please contact us to define more precisely the method of money transfer and other . How to reach us: Mail: Vitaly Gumirov Virtual Objects Software 6 Lavrentyeva St Novosibirsk 630090 Russia E-mail: vos@ifshop.ict.nsk.su WARRANTY: THE AUTHOR HEREBY DISCLAIMS ALL WARRANTIES RELATING TO THIS SOFTWARE, WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR WILL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT OR SIMILAR DAMAGES DUE TO LOSS OF DATA OR ANY OTHER REASON, EVEN IF THE AUTHOR OR AN AGENT OF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL THE AUTHOR'S LIABILITY FOR ANY DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO USE THE SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. ═══ 5. Installation ═══ To install the RXLEPSOM package run create some directory for it and unzip this archieve there then run install.cmd and follow its instructions. ═══ 6. Lotus 123 macro interface ═══ This section describes how to use RXLEPSOM package from Lotus 123G. ═══ 6.1. Special 123G macro commands to be used ═══ Lotus 123G has a special macro command {attach-library} which allows to load a DLL with an additional macro commands and @functions. So, to use the RXLEPSOM with the 123G you should execute a macro: {library-attach 123REXX} Note, that you will get an error message while executing this macro if all the RXLEPSOM's DLLs are not located somewhere in your LIBPATH. 123REXX.DLL adds the {rxadd} macro command, which you could execute after attaching. It allows you to register the new REXX macro for 123G. This macro command should be executed with the following parameters: {rxadd ;;} where Argument Description is a string containing the name of the new macro to register; is a string containing the name of REXX or ObjectREXX program file, which implements your new macro; is an address or name of the range containing the definitions of arguments of your new macro. The last parameter needs more details. The above range should be one sheet and one column vertical range one cell per new macro's argument. Each cell should contain the type definition of the corresponding argument. This definition is a number of the type or a special formula. For the purpose of simplification, 123REXX.DLL adds the following @functions to the 123G: @TYPESTRING(1), @TYPENUMBER(1), @TYPERANGE(1). These functions are ignoring any attributes, but the syntax of writing Lotus 123 formulae requires @function to receive at least one parameter. We recommend you to use these @functions for defining new macro attributes. Thus, for example, let us register the new REXX macro command {rxtest} located in the file "c:\lotus\rexx\tst.cmd" and receiving the following parameters: {rxtest <"string">;;;} To do so we should go thru the following steps. ═══ 6.2. Steps to register new REXX macro ═══ ╔════════╤══════════════════════════════════════════════════════════════╗ ║ Cell │ Cell value to be entered or key to be pressed ║ ║address │ ║ ╠════════╧══════════════════════════════════════════════════════════════╣ ║ Step 1: Filling the range containing the definitions of the new║ ║ macro arguments. (See Macro Arguments Types) ║ ╟────────┬──────────────────────────────────────────────────────────────╢ ║ A:D1 │ formula "+@TYPESTRING(1)" ║ ║ A:D2 │ formula "+@TYPERANGE(1)" ║ ║ A:D3 │ formula "+@TYPERANGE(1)" ║ ║ A:D4 │ formula "+@TYPENUMBER(1)" ║ ╠════════╧══════════════════════════════════════════════════════════════╣ ║ Step 2: Entering the registering macro commands. ║ ╟────────┬──────────────────────────────────────────────────────────────╢ ║ A:B1 │ {library-attach 123REXX} ║ ╟────────┼──────────────────────────────────────────────────────────────╢ ║ A:B2 │ Erase the cell A:B2 (place here the cursor and press ║ ║ │ Del button). ║ ╟────────┼──────────────────────────────────────────────────────────────╢ ║ A:B3 │{rxadd "rxtest";"c:\lotus\rexx\tst.cmd";A:D1..A:D4} ║ ╟────────┼──────────────────────────────────────────────────────────────╢ ║ A:B4 │{library-detach 123REXX} ║ ╟────────┼──────────────────────────────────────────────────────────────╢ ║ A:B5 │ Erase the cell A:B5 (place here the cursor and press║ ║ │ Del button). ║ ╠════════╧══════════════════════════════════════════════════════════════╣ ║ Step 3: Attaching the RXLEPSOM support DLL ║ ╟────────┬──────────────────────────────────────────────────────────────╢ ║ A:B1 │ press consequently keys "Alt-F3","Esc","Enter" ║ ╠════════╧══════════════════════════════════════════════════════════════╣ ║ Step 4: Executing of the register macro: ║ ╟────────┬──────────────────────────────────────────────────────────────╢ ║ A:B3 │ press consequently keys "Alt-F3","Esc","Enter" ║ ╠════════╧══════════════════════════════════════════════════════════════╣ ║ Step 3: Re-attaching the RXLEPSOM support DLL ║ ╟────────┬──────────────────────────────────────────────────────────────╢ ║ A:B1 │ press consequently keys "Alt-F3","Esc","Enter" ║ ╚════════╧══════════════════════════════════════════════════════════════╝ After these steps you could execute {rxtest} macro ═══ 6.3. Macro Arguments Types ═══ Definition of the new macro needs you to specify this new macro arguments' types. When you adding the new macro from 123G you should fill the range of cells containing the numbers of types of the new macro arguments. To simplify this procedure RXLEPSOM adds the special @functions: @TYPERANGE corresponds to range arguments. @TYPESTRING corresponds to string arguments. @TYPENUMBER corresponds to number arguments. Note: these @functions need any one argument to be specified, when used in 123G cell formulas. For example, you should enter in the 123G cell "+@TYPESTRING(1)" but not "+@TYPESTRING()". When you adding new macro using LEPRexxMacroManager :: AddNewMacro method you should specify the array of unsigned shorts containing the numbers of types of the macro arguments: 0 corresponds to string arguments. 1 corresponds to number arguments. 4 corresponds to range arguments. ═══ 7. ObjectREXX and SOM API ═══ ObjectREXX API is based on the fact that ObjectREXX programs could directly use SOM classes (on how to use SOM classes in ObjectREXX programs see ObjectREXX documentation). RXLEPSOM package includes the following SOM classes: 1. Interface classes representing an abstraction of Lotus 123 macro argument types: NOTE: LEPValue class is an abstract class, that is you could ──── not use it directly from your programs. 2. The class LEPArgumentsArray implements an abstraction of the macro arguments' list. Any REXX macro receives as its argument a pointer to the LEPArgumentsArray instance. This array object contains an arguments of the macro taken from the issued 123G macro command. Each argument is represented as an object of the LEPValue's successor. 3. The class LEPRexxMacroManager having the only one instance implements a macro manager. It has a methods to add, delete or query an information on REXX macros. 4. Miscellaneous additional classes. Class LEPCoord implements an abstraction of the 123G table coordinates. ═══ 7.1. Class LEPValue ═══ Inherits: SOMObject ═══ 7.1.1. Methods ═══ ═══ 7.1.1.1. unsigned short lepType(); ═══ Qualification: public Arguments: none Notes: This method should be overridden in the inheritors. Returns: It should return LEPC_PROT_TYPE* constant from the LEP.H ═══ 7.1.1.2. unsigned short lepSize(); ═══ Qualification: public Arguments: none Notes: This method should be overridden. Returns: It returns the size of the value attribute to be used with Lep*GetArgValue function. ═══ 7.1.1.3. void* value_attribute_address() ═══ Qualification: protected Arguments: none Notes: This method should be overridden. Returns: It returns the address of value attribute in the successor's instance ═══ 7.2. Class LEPInteger ═══ Inherits classes: LEPValue Overrides methods: lepType lepSize value_attribute_address ═══ 7.2.1. Attributes ═══ See bellow ═══ 7.2.1.1. long value ═══ Qualification: public Notes: this attribute contains an integer value ═══ 7.3. Class LEPString ═══ Inherits classes: LEPValue Overrides methods: lepType lepSize value_attribute_address ═══ 7.3.1. Attributes ═══ ═══ 7.3.1.1. string value ═══ Qualification: public Notes: this attribute contains a string value ═══ 7.4. Class LEPReal ═══ Inherits classes: LEPValue Overrides methods: lepType lepSize value_attribute_address ═══ 7.4.1. Attributes ═══ ═══ 7.4.1.1. double value ═══ Qualification: public Notes: this attribute contains real value ═══ 7.5. Class LEPRange ═══ Inherits classes: LEPValue Overrides methods: lepType lepSize value_attribute_address ═══ 7.5.1. Attributes ═══ ═══ 7.5.1.1. LEP_PRANGE pRange ═══ Qualification: private Notes: this attribute contains pointer to the 123G range ═══ 7.5.1.2. LEPCoord dimension ═══ Qualification: public Notes: this attribute contains the dimension of this range ═══ 7.5.2. Methods ═══ ═══ 7.5.2.1. void InitRange(in LEP_PRANGE range_ptr) ═══ Qualification: public Arguments: LEP_PRANGE range_ptr contains a pointer to the range which is used to initialize pRange attribute Notes: This method is used to initialize this object's attributes (pRange and dimension) Returns: ═══ 7.5.2.2. LEP_LEPC_RET GetCellType(cell_coord, pType, pSize) ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates out unsigned short pType: type of the cell at the given coordinates out unsigned short pSize: size of the value in the cell at the given coordinates Notes: This method retrieves the type and the size for the cell of this range defined by its cell_coord. Returns: LEP error code ═══ 7.5.2.3. LEP_LEPC_RET GetCellInteger(cell_coord, value) ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates out long value: value of the cell at the given coordinates Notes: This method retrieves the integer value of the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.4. LEP_LEPC_RET GetCellString(cell_coord, value) ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates out string value: returned string value of the cell at the given coordinates Notes: This method retrieves the string value of the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.5. LEP_LEPC_RET GetCellValue(cell_coord,value) ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates out string value: returned string value of the cell at the given coordinates Notes: This method retrieves the string value of the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.6. LEP_LEPC_RET GetCellDouble(cell_coord,value) ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates out double value: returned double value of the cell at the given coordinates Notes: This method retrieves the double value of the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.7. LEP_LEPC_RET GetCellFormula(in LEPCoord cell_coord,inout string value); ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates out string value: returned formulae at the given coordinates Notes: This method retrieves formula string in the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.8. LEP_LEPC_RET SetCellInteger(in LEPCoord cell_coord,in long value ); ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates in long value: value to be placed in the cell at the given coordinates Notes: This method sets the given long value to the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.9. LEP_LEPC_RET SetCellString(in LEPCoord cell_coord,in string value); ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates in string value: value to be placed in the cell at the given coordinates Notes: This method sets the given string value to the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.10. LEP_LEPC_RET SetCellValue(in LEPCoord cell_coord,in string value); ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates in string value: value to be placed in the cell at the given coordinates Notes: This method sets the given string value to the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.11. LEP_LEPC_RET SetCellDouble(in LEPCoord cell_coord,in double value); ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates in double value: value to be placed in the cell at the given coordinates Notes: This method sets the given double value to the cell at the given coordinates Returns: LEP error code ═══ 7.5.2.12. LEP_LEPC_RET SetCellFormula(in LEPCoord cell_coord, in string value); ═══ Qualification: public Arguments: in LEPCoord cell_coord: cell coordinates in string value: formula to be placed in the cell at the given coordinates Notes: This method places the given formula in the cell at the given coordinates and forces 123G to calculate the value of this formula. Returns: LEP error code ═══ 7.5.2.13. void DisplayError(in string err_msg); ═══ Qualification: public Arguments: in string err_msg: error message to be displayed Notes: This method displays the error message window with the given message. Returns: none ═══ 7.6. Class LEPArgumentsArray ═══ Inherits classes: SOMObject ═══ 7.6.1. Attributes ═══ ═══ 7.6.1.1. sequence args ═══ Qualification: public Notes: this is the list of the LEPValue objects contained in this array ═══ 7.6.2. Methods ═══ ═══ 7.6.2.1. long Size(); ═══ Qualification: public Arguments: none Notes: Returns: the size of this array ═══ 7.6.2.2. LEPValue GetByNo(in long i); ═══ Qualification: public Arguments: in long i: the number of the element to be returned Notes: Returns: the i-th element of this array ═══ 7.6.2.3. boolean InitArray(in long size); ═══ Qualification: public Arguments: in long size: the size of the array to be allocated Notes: Allocates the array with the given size Returns: TRUE on success FALSE on any error occurred while allocating ═══ 7.6.2.4. boolean AddLEPValue(in LEPValue lv); ═══ Qualification: public Arguments: in long size: the size of the array to be allocated Notes: Adds the given LEPValue to the end of this array Returns: TRUE on success FALSE on any error occurred while adding ═══ 7.7. LEPRexxMacroManager ═══ Inherits classes: SOMObject ═══ 7.7.1. Types ═══ ═══ 7.7.1.1. MacroEntry ═══ struct MacroEntry { string macroName; string macroFile; unsigned short argsNumber; unsigned short *argsPrototypes; }; ═══ 7.7.1.2. LEPMacroFunctionPtr ═══ typedef void *LEPMacroFunctionPtr; ═══ 7.7.2. Attributes ═══ ═══ 7.7.2.1. attribute sequence mtable; ═══ attribute sequence mtable; This attribute contains rexx macro definitions ═══ 7.7.2.2. readonly attribute unsigned long size; ═══ readonly attribute unsigned long size; This is the number of registered macroses in this object ═══ 7.7.3. Methods ═══ ═══ 7.7.3.1. AddNewMacro ═══ Syntax macroId=AddNewMacro(name, file, argsNum, argsProts); Qualification: public Arguments: in string name: The new macro's name. in string file: The name of the file which containes this new macro implementation. in unsigned short argsNum: The number of arguments. in unsigned short * argsProts: The array which containes the types of the macro arguments. For definition of the macro arguments types see Macro Arguments Types Notes: This method new adds macro entry to this macro manager table. NOTE: all strings and arrays will be copied, so you could free those of parameters which you've allocated before the call and need no longer. Returns: This method returns the number of the new record in the mtable, correponded to the newly registered macro. On any error returns -1. ═══ 7.7.3.2. GetName ═══ Syntax string macroName=GetName(macroId); Qualification: public Arguments: in long macroId: The id number of the macro which name you want to know. Notes: This method is used to get name of the macro specified by it's id number. Returns: This method returns the name of the macro having the given id. It returns NULL string if there was no macro with the given id registered. ═══ 7.7.3.3. GetFilename ═══ Syntax string macroFile=GetFilename(macroId); Qualification: public Arguments: in long macroId: The id number of the macro which filename you want to know. Notes: This method is used to get filename of the macro specified by it's id number. Returns: This method returns the filename of the macro having the given id. It returns NULL string if there was no macro with the given id registered. ═══ 7.7.3.4. GetArgsNumber ═══ Syntax unsigned short macroArgs=GetArgsNumber(macroId); Qualification: public Arguments: in long macroId: The id number of the macro which arguments number you want to know. Notes: This method is used to get number of arguments of the macro specified by it's id number. Returns: This method returns the number of the arguments of the macro having the given id. It returns 0 if there was no macro with the given id registered. ═══ 7.7.3.5. GetArgsPrototypes ═══ Syntax unsigned short *macroTypes=GetArgsPrototypes(macroId); Qualification: public Arguments: in long macroId: The id number of the macro which arguments types you want to know. Notes: This method is used to get the types of the arguments of the macro specified by it's id number. Returns: This method returns the array containing the types of the arguments of the macro having the given id. It returns NULL if there was no macro with the given id registered. ═══ 7.7.3.6. GetArgType ═══ Syntax unsigned short macroType=GetArgType(macroId, argNo); Qualification: public Arguments: in long macroId: The id number of the macro which argument type you want to know. in long argNo: Notes: This method is used to get type of argument argNo of the macro specified by it's id number. Returns: This method returns the type of the argument number argNo of the macro having the given id. It returns (unsigned short)(-1) if there was no macro with the given id registered or the specified macro does not have the specified argument. ═══ 7.7.3.7. DeleteMacroById ═══ Syntax boolean ret=DeleteMacroById(macroId); Qualification: public Arguments: in long macroId: The id number of the macro which you want to delete. Notes: This method is used to deregister the specified macro and remove its definition from the LEPRexxMacroManager table. Returns: This method returns TRUE on success and FALSE if any error occurrs. ═══ 7.7.3.8. DeleteMacroByName ═══ Syntax boolean ret=DeleteMacroByName(macroName); Qualification: public Arguments: in long macroName: The name of the macro which you want to delete. Notes: This method is used to deregister the specified macro and remove its definition from the LEPRexxMacroManager table. Returns: This method returns TRUE on success and FALSE if any error occurrs. ═══ 7.7.3.9. AddMacro ═══ Syntax macroId=AddMacro(name, file, argsNum, argsProts); Qualification: public Arguments: in string name: The new macro's name. in string file: The name of the file which containes this new macro implementation. in unsigned short argsNum: The number of arguments. in unsigned short * argsProts: The array which containes the types of the macro arguments. For definition of the macro arguments types see Macro Arguments Types Notes: If there was no macro with the specified name registered before this call this method issues AddNewMacro . If there was some one this method calls DeleteMacroByName(name) before calling AddNewMacro . NOTE: all strings and arrays will be copied, so you could free those of parameters which you've allocated before the call and need no longer. Returns: This method returns the number of the new record in the mtable, correponded to the newly registered macro. On any error returns -1. ═══ 7.7.3.10. GetId ═══ Syntax long macroId=GetId(macroName); Qualification: public Arguments: in long macroName: The name of the macro which id you want to get. Notes: This method is used to get the id of the macro by its name. Returns: This method returns -1 if any error occurrs. ═══ 7.7.3.11. DisplayError ═══ Syntax DisplayError(err_msg); Qualification: public Arguments: in string err_msg: The error message to be displayed in the special 123G message box. Notes: This method is used to display the given error message in the special 123G macro error message box. Returns: Nothing (void). ═══ 8. RXLEPSOM REXX API ═══ ═══ 8.1. LepSomLoadFuncs ═══ Syntax: call LepSomLoadFuncs This function registers all the RXLEPSOM REXX API functions. Example: call RxFuncAdd 'LepSomLoadFuncs', 'rxlepsom', 'LepSomLoadFuncs' call LepSomLoadFuncs ═══ 8.2. LepDisplayError ═══ Syntax: call LepDisplayError msg This function displays the given error message msg. Example: call LepDisplayError 'Macro error' This call displays the string 'Macro error' in the Lotus 123G error window. ═══ 8.3. LepAAnew ═══ Syntax: lepAA=LepAAnew(argv.1) This function returns a LEPArgumentsArray object, whose address it receives as a long value. It is usually used in the REXX macro prolog (see the given example). ═══ Example ═══ call RxFuncAdd 'LepSomLoadFuncs', 'rxlepsom', 'LepSomLoadFuncs' call LepSomLoadFuncs parse arg args n=words(args) call lineout tst.log,'Arguments are ='args do i=1 to n argv.i=word(args,i) end lepAA=LepAAnew(argv.1) if LepGetClassName(lepAA)\='LEPArgumentsArray' then do cr=x2c('0D'); msg='Internal error in 123REXX.DLL RexxAddMacro function.' msg=msg||cr||'Please contact us to inform about the conditions of this error.' LepDisplayError(msg); end argNum=LepAAGetByNo(lepAA) lepArg.0=argNum do i=1 to argNum lepArg.i=LepAAGetByNo(lepAA, i-1) /* Lep arguments are enumerated starting from 0 */ call lineout tst.log, 'lepArg.'i' is a 'LepGetClassName(lepArg.i) end ═══ 8.4. LepAAGetByNo ═══ Syntax: retVal=LepAAGetByNo (lepAA [, no]) This function returns the element number no of the specified LEPArgumentsArray lepAA object. If there is no 2nd argument given it returns the size of the specified array. See the following example . ═══ 8.5. LepGetClassName ═══ Syntax: retVal=LepGetClassName(obj) If the given obj is a valid RXLEPSOM object representation this function returns its class name. Else it returns "". ═══ 8.6. LepGetRangeSheets ═══ Syntax: retVal=LepGetRangeSheets(range) Here range should be a valid RXLEPSOM representation of the LEPRange instance object, i.e. for example LepGetClassName(range) should return 'LEPRange' string. In this case this function returns the number of sheets in the given range object. ═══ 8.7. LepGetRangeCols ═══ Syntax: retVal=LepGetRangeCols(range) Here range should be a valid RXLEPSOM representation of the LEPRange instance object, i.e. for example LepGetClassName(range) should return 'LEPRange' string. In this case this function returns the number of columns in the given range object. ═══ 8.8. LepGetRangeRows ═══ Syntax: retVal=LepGetRangeRows(range) Here range should be a valid RXLEPSOM representation of the LEPRange instance object, i.e. for example LepGetClassName(range) should return 'LEPRange' string. In this case this function returns the number of rows in the given range object. ═══ 8.9. LepGetObjValue ═══ Syntax: retVal=LepGetObjValue(obj) Here obj should be a valid RXLEPSOM representation of the LEPValue instance object, i.e. for example LepGetClassName(obj) should return the string containing a name of some of the LEPValue's ancestor class. In this case the returned depends on the class of the given obj. For classes LEPReal, LEPInteger, LEPString the retVal is the REXX string representation of the value stored in the given object. If the given object is a LEPRange this functions simply returns the given obj. ═══ 8.10. LepSetCellString ═══ Syntax: retc=LepSetCellString(range, sheet, column, row, str) This function places the given string value str into the cell having the given coordinates (sheet, column, row) inside the given range. Returns the LEP error code. ═══ 8.11. LepSetCellNumber ═══ Syntax: retc=LepSetCellNumber(range, sheet, column, row, number) This function places the given number into the cell having the given coordinates (sheet, column, row) inside the given range. Returns the LEP error code. ═══ 8.12. LepGetCell ═══ Syntax: value=LepGetCell(range, sheet, column, row) This function retrieves the value from the cell having the given coordinates (sheet, column, row) inside the given range and returns it. ═══ 8.13. LepMacroGetName ═══ Syntax: macroName=LepMacroGetName(macroId) This function queries the name of the macro having the given macroId in the LEPRexxMacroManager object. If there are no macros registered under the given macroId the error signal will be raised. ═══ 8.14. LepMacroGetId ═══ Syntax: macroId=LepMacroGetId(macroName) This function queries the macroId of the macro having the given macroName in the LEPRexxMacroManager object. If there are no macros registered under the given macroId the '-1' value will be returned. ═══ 8.15. LepMacroGetFile ═══ Syntax: macroFile=LepMacroGetFile(macroId) This function queries the file name of the macro having the given macroId in the LEPRexxMacroManager object. If there are no macros registered under the given macroId the error signal will be raised. ═══ 8.16. LepMacroGetArgs ═══ Syntax: argsNumber=LepMacroGetArgs(macroId) This function queries the number of arguments of the macro having the given macroId in the LEPRexxMacroManager object. If there are no macros registered under the given macroId the error signal will be raised. ═══ 8.17. LepMacroGetProt ═══ Syntax: argsPrototype=LepMacroGetProt(macroId, argNo) This function queries the type of the argument with the given argNo of the macro having the given macroId in the LEPRexxMacroManager object. If there are no macros registered under the given macroId the error signal will be raised. Note, that argNo should be less than the value returned by the LepMacroGetArgs(macroId) call. ═══ 8.18. LepMacroDeleteById ═══ Syntax: retc=LepMacroDeleteById(macroId) This function removes the macro specified by its macroId from the LEPRexxMacroManager object's table. If there are no macros registered under the given macroId the error signal will be raised. It returns FALSE (0) if any error occurs while removing. ═══ 8.19. LepMacroDeleteByName ═══ Syntax: retc=LepMacroDeleteByName(macroName) This function removes the macro specified by its macroName from the LEPRexxMacroManager object's table. It returns FALSE (0) if any error occurs while removing. ═══ 8.20. LepMacroNum ═══ Syntax: macrosNum=LepMacroNum() This function returns the number of registered RXLEPSOM macros.