--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/fe6f8511-9756-478c-b712-a3aae1d28065n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/fab3ba30-d0e6-4aee-be37-d3f60051ca75n%40googlegroups.com.
Joe - good to see you posting here. Let me extend this paradigm just a bit further.
I, too, like Rex's idea of using equated integers and using them for either dimensioned or dynamic variables. I'd suggest taking the idea even a bit further...
Brian Leach, in England, has suggested a structure for documenting dictionaries which is very helpful and it works for UniVerse style dictionaries as well as Pick 'S'-type and 'A'-type dictionaries. Since Pick/UniVerse flavors allow multiple dictionaries for a data file, I have extended Brian's work to include a prefix to the description that is for dictionary group. This is an integer that represents a sum of the various dictionary files in which a dictionary is to occur. For instance, the dictionary created with the file is assigned a value of 1 (In Joe's example, this would be the dictionary for the 'INVOICE' file). A dictionary file created for ODBC might be called 'ODBC.INVOICE' and would be assigned a value of 2. If a dictionary occurs in both files (with the same format, etc.), the dictionary group would be 3 (1+2).
Using a subroutine, I can pull all of the data from dictionaries and, if necessary, export them to text files. Using any of the standard compare tools, I can then compare, by example, the INVOICE and the ODBC.INVOICE dictionaries.
The other big advantage to using the equated values is that is someone gets a wild hair and moves a particular element, say from attribute 1 to attribute 5, the included reference to the file does not need to change, only the reference in the include file, followed by re-compiling any programs using that include file. Hopefully, though, we're not moving fields around too often!
Who in his right mind would want to change the attribute positions in a file?
The only time in my career that I was told to do that was by a so-called analyst who also told me that I was not allowed to use multi-values in data files because according to the school of Codd they are illegal.
That's UK government for you. Hire a Pick analyst-programmer for 35 GBP an hour and an "analyst" who doesn't know Pick at all for 50 to tell the programmer how to do his job. No wonder they can't even organize a piss-up in a brewery.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/fbb40fe7-da90-4c02-82b5-6a75f773767en%40googlegroups.com.
If we are widening the response beyond UV, it is worth adding that OpenQM has a compiler option to record equate tokens used in the program in the symbol table. They can then be used in the debugger as the OP wants.
From: mvd...@googlegroups.com <mvd...@googlegroups.com>
On Behalf Of Jim Idle
Sent: 21 July 2022 07:40
To: mvd...@googlegroups.com
Subject: Re: [mvdbms] Using EQU with dimensioned arrays in the debugger
EXTERNAL EMAIL |
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/CAGPPfg8stSQ_j9g%3D%3DUF4YEhaa63iufOzKxpAVsRXKPUbyDASmA%40mail.gmail.com.
================================
Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
================================
This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy
all copies of this communication. Thank you.
* COPYRIGHT (C) BANK OF HORTON - STUDENT LOAN SERVICES
* 108 E. 8TH STREET
* HORTON, KS 66439
* 913/486-2113
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/fbb40fe7-da90-4c02-82b5-6a75f773767en%40googlegroups.com.
Most likely because not many people find it useful or see a need
for it.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/0d8de835-9e1a-4aad-9e3c-d16994ce768en%40googlegroups.com.
At DocMagic we require all files to use EQU’s on dimmed arrays; the array is usually in a named common with the name of the file (there are legacy exceptions).
Naming conventions are essential to make the code clear and avoid collisions and dreaded ‘global common bugs’ (which can and do happen other ways; but that’s the downside of not having an object oriented language in general).
Here’s an example of our INPUT <screen> custom ‘Bottom Line’ options setup that shows lots of our coding conventions developed over 35 years:
INPUT.COMMON:
common /INPUT/ SCREEN.REC(98) ;* See EQU.SCREEN and SCREEN.C
EQU.SCREEN:
equate SCREEN.C to 98
…
…
…
equate SCREEN$IdSeparator to SCREEN.REC(13) ;* Multi-part key separator ('~','_', etc)
equate SCREEN$AllowPartialId to SCREEN.REC(14) ;* 'T'op, 'M'iddle, 'B'ottom, or 'N'one allowed blank (old SCR.KEY.PARTIAL)
equate SCREEN$MiscDisplays to SCREEN.REC(15)
equate SCREEN$PostInputSub to SCREEN.REC(17)
equate SCREEN$PageHeadingS to SCREEN.REC(18) ;* All we have for each Page now
equate SCREEN$BottomHelpS to SCREEN.REC(19) ;* (see below)
equate SCREEN$BottomOptionS to SCREEN.REC(21) ;* Custom bottom-line options
equate SCREEN$BottomDescS to SCREEN.REC(22) ;* and (short) descriptions
equate SCREEN$BottomActionS to SCREEN.REC(23) ;* See SCREEN '?' for Actions syntax
equate SCREEN$BottomLogicS to SCREEN.REC(24) ;* MagicLogic to turn this option on/off
*quate SCREEN$BottomHelpS to SCREEN.REC(19) ;* Full line of help text for '?' option
…
Since we use this is ALL CODE, it never takes more than a few seconds to find all the usages of a data point:
>FIND.BP SCREEN\$Bottom
/u/dsisrc/RMS.BP/EQU.SCREEN:* 28.Apr.2022 james: MV-115: New field SCREEN$BottomHelpS
/u/dsisrc/RMS.BP/EQU.SCREEN: equate SCREEN$BottomHelpS to SCREEN.REC(19) ;* (see below)
/u/dsisrc/RMS.BP/EQU.SCREEN: equate SCREEN$BottomOptionS to SCREEN.REC(21) ;* Custom bottom-line options
/u/dsisrc/RMS.BP/EQU.SCREEN: equate SCREEN$BottomDescS to SCREEN.REC(22) ;* and (short) descriptions
/u/dsisrc/RMS.BP/EQU.SCREEN: equate SCREEN$BottomActionS to SCREEN.REC(23) ;* See SCREEN '?' for Actions syntax
/u/dsisrc/RMS.BP/EQU.SCREEN: equate SCREEN$BottomLogicS to SCREEN.REC(24) ;* MagicLogic to turn this option on/off
/u/dsisrc/RMS.BP/EQU.SCREEN: *quate SCREEN$BottomHelpS to SCREEN.REC(19) ;* Full line of help text for '?' option
/u/dsisrc/RMS.BP/INPUT.MAIN:* 28.Apr.2022 james: MV-115: '?' Help on bottom line options; use SCREEN$BottomHelpS
/u/dsisrc/RMS.BP/INPUT.MAIN: NUM.BOT.OPTS = dcount(SCREEN$BottomOptionS, @VM) ;* Now in Commons
/u/dsisrc/RMS.BP/INPUT.MAIN: Logic = SCREEN$BottomLogicS<1, N.B.O>
/u/dsisrc/RMS.BP/INPUT.MAIN: OPTS<-1> = SCREEN$BottomOptionS<1, N.B.O> ; DESCS<-1> = SCREEN$BottomDescS<1, N.B.O>
/u/dsisrc/RMS.BP/INPUT.MAIN: locate( O, SCREEN$BottomOptionS, 1; N.B.O ) then ;* Entered a user-defined option?
/u/dsisrc/RMS.BP/INPUT.MAIN: BL.ACT = SCREEN$BottomActionS<1,N.B.O> ;* TAKE ACTIOOOOOOWN
/u/dsisrc/RMS.BP/INPUT.MAIN: if SCREEN$BottomOptionS # '' then
/u/dsisrc/RMS.BP/INPUT.MAIN: NUM.BOT.OPTS = dcount(SCREEN$BottomOptionS, @VM) ;* Now in Commons
/u/dsisrc/RMS.BP/INPUT.MAIN: Logic = SCREEN$BottomLogicS<1, N.B.O>
/u/dsisrc/RMS.BP/INPUT.MAIN: HelpLine = SCREEN$BottomHelpS<1, N.B.O>
/u/dsisrc/RMS.BP/INPUT.MAIN: if HelpLine = '' then HelpLine = SCREEN$BottomDescS<1, N.B.O>
/u/dsisrc/RMS.BP/INPUT.MAIN: BotLineHelp := @FM:' ':PrS:SCREEN$BottomOptionS<1, N.B.O>:PrX:' : ':HelpLine
>
And when using the values it’s crystal clear they’re from a global common:
…
* 20.Feb.1986 jim: First Draft
…
…
…
* Add custom options from SCREENS file:
NUM.BOT.OPTS = dcount(SCREEN$BottomOptionS, @VM) ;* Now in Commons
for N.B.O = 1 to NUM.BOT.OPTS
Logic = SCREEN$BottomLogicS<1, N.B.O>
if Logic # '' then
call INPUT.CMD( Logic ) ;* Does this need more setup, etc !?
end else Logic = @TRUE
if Logic then
OPTS<-1> = SCREEN$BottomOptionS<1, N.B.O> ; DESCS<-1> = SCREEN$BottomDescS<1, N.B.O>
end
next N.B.O
…
SCREENS screen definition:
How it renders on the bottom line(s) (from the code snippet above):
‘?’ option shows ‘Help’ details:
.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/73e38e3a-7f7c-4a3e-a645-1a5081f18baan%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/1cd35f81-a733-4027-a511-53f80f43080dn%40googlegroups.com.