Accessing VME resources from a rule module

There are several important rules to observe when running a FlashBASIC module, either as a Visual Basic rule module object from a subroutine called by such an object, or from a trigger.

  • If the trigger or rule module is invoked from a VB application, the user is logged on to the VME with a user-ID equal to the Windows user name, appended with an underscore.

  • If the trigger or rule module is invoked by a process running in a VME, the user-ID is constructed by concatenating the D3 user (not the Windows user) with a $, followed by the PIB associated with the user (not the trigger’s PIB) and another $ (for example, dm$1$). This user-ID cannot be used outside of the module context. The password is generated automatically.

  • The USERS item-ID can be modified, but must not have any logto command in the user's macro field.

Database The user is logged on to the default database (normally FSI:DM).

All FlashBASIC statements are supported, with the following notes:

data/execute The execute is run on a randomly selected PIB. There is no guarantee that two invocations of the same rule module doing an execute will get the same PIB. Therefore, it is recommended that you not have one rule module doing an execute select and another rule module doing another execute trying to use the select list. Make sure both execute statements are in the same rule module - select from one module and use the list from another module.
oconv() The MR/ML and MC mask correlatives are supported natively by FlashBASIC and do not require VME access. All other oconv versions do require VME access.
iconv() All other iconv versions require VME access.

The following system() functions are supported natively by Flash and do not require VME access:

0, 12, 19, 41, 42, 43

All other values are executed by logging on to the VME.

time() The returned time is the client’s time.
date() The returned date is the client’s date.
timedate() The returned time date is the client’s time date. ANSI syntax is used for the abbreviated month.
sleep() Only the sleep for form is supported. In other words, the argument must be a number of seconds, not a wake-up time. The sleep until form logs on to the VME.
sort() Only simple (ascending and descending) sorts are allowed. sort() functions of greater complexity require VME access and may result in decreased performance.
@() The escape sequences are returned for an ANSI emulation. The terminal type cannot be modified by an execute.

Printing from a rule module

FlashBASIC runtime supports printing from a rule module called from Visual Basic or the D3 File Manager. The print and printer FlashBASIC statements direct output to one or more Windows printers after issuing the printer on statement.

To enable this feature, the variable below must be set in the MS-DOS environment:



PrinterName Specifies the name and location of a printer (for example, \\Server\Printer).
boj (Optional) Beginning of job page eject. Specifies whether or not an empty page is ejected before a print job. Possible values are:
S Suppresses the initial page eject.
null Ejects one page prior to each job.
eoj (Optional) End of job page eject. Specifies number of empty pages from 0-8 the printer ejects after each job. The default is 0.


name The boj and eoj are not specified, resulting in a single page eject prior to the job. No page ejects occur after the job.
name,S The boj specification is S (suppress) and the eoj is not specified. The result is no page ejects prior to or after the job.
name,,5 The boj specification is null and the eoj specification is 5. The result is a single page eject prior to the job and 5 page ejects after.
name,S,7 The boj specification is S (suppress) and the eoj specification is 5. The result is no page eject prior to the job and 7 page ejects after.

The printer device is specified with the print on statement, where the device number, starting at 0, is the device listed in the D3FLASHPRT MS-DOS variable. By default, the first printer(0) is used.