In my ARev app, I make extensive use of DICT.VOC and VOC:
1. I have a number of "universal" definitions in DICT.VOC (i.e. ARev would look in DICT.VOC when asked for a {} that was not in the local DICT). Can such functionality be imitated in OI?
2. In most installations, I would have a BP and a LOCAL.BP table. BP would contain the standard routines. LOCAL.BP would contain customized routines. By manipulating the VOC RBASIC entries, if the particular installation had a custom routine, I would just modify the VOC entry to refer to LOCAL.BP instead of BP. Is there a way to imitate this capability in OI?
Thanks,
David
You get nearly the same functionality in OI by logging as SYSPROG and then making entries in SYSDICT. You can also use R/BASIC routines called from DICT entries but you'll have to code them as Stored Procedures .. they're stored in SYSOBJ. You build them from System Editor. You can use Functions or Subroutines. You also have access to the old favoriets @RECORD, @ID and I think @DICT. R/LIST first looks in a local dictionary for the app. Failing that, it will look in SYSDICT.
HTH
Don Miller
C3 Inc.
-You get nearly the same functionality in OI by logging as SYSPROG and then making entries in SYSDICT.
Do you have to be in SYSPROG? Ideally, I would like "universal" dictionary entries by application, so that I don't inherit them into all applications.
-You can also use R/BASIC routines called from DICT entries but you'll have to code them as Stored Procedures .. they're stored in SYSOBJ.
I am not sure what you mean. As far as I knew, all the object code for stored procedures was kept in SYSOBJ, with no intervening "VOC" type call. What I am looking for is a SIMPLE way to occasionally use customized versions of my stored procedures, a la ARev, in which I could simply keep the alternate code in a separate table. (If you mean that you can call stored procedures from dict object code, I already am doing that.)
Thanks,
David
David..
SYSDICT from SYSPROG is GLOBAL. Therefore any "VOC" type items (DICT CALLS and not VOC TCL type calls) are available from any application.
An example of a SYSDICT CALL might look like
SYSDICT NAME … COUNTER
Could be coded as @ANS=1 or CALL GET_COUNTER
in Stored Procedures:
FUNCTION GET_COUNTER
FOO=1
RETURN FOO
You can do a lot more than that obviously. I code a lot of dictionary calls as stored procedures because they are much easier to debug than a dict call.
HTH
Don Miller
C3 Inc.