Order of fields in "MODIFY"

3 views
Skip to first unread message

Gary

unread,
Jul 20, 2009, 9:30:41 AM7/20/09
to OpenQM-OpenSource
To all:

My port to OpenQM is in full swing and I just stumbled upon a big
problem. I moved a data file from the old ISAM system to OpenQM. The
fields in OpenQM are in the same order as they existed in the old
file. The single value fields show up just fine in MODIFY (i.e.,
field 1 is first, field 2 is second, etc.), HOWEVER the multi-value
fields are in NO APPARENT ORDER so that related items that are next to
each other (by design) are now spread all over the place. It makes it
VERY hard to inspect/change files with MODIFY. Is there anything I
can do to fix this? I can deal with all the single-valued fields
listing first (although that would not have been my first choice), but
it's almost impossible to use MODIFY for the multi-valued fields
because I can't find the field I want to inspect/change (there are
about 100 single-valued fields and 100 multi-valued fields). Any
suggestions?

Gary

Ashley Chapman

unread,
Jul 20, 2009, 9:34:38 AM7/20/09
to openqm-o...@googlegroups.com
Gary,

2009/7/20 Gary <gwal...@gmail.com>


To all:

   My port to OpenQM is in full swing and I just stumbled upon a big
problem.  I moved a data file from the old ISAM system to OpenQM.  The
fields in OpenQM are in the same order as they existed in the old
file.  The single value fields show up just fine in MODIFY (i.e.,
field 1 is first, field 2 is second, etc.), HOWEVER the multi-value
fields are in NO APPARENT ORDER so that related items that are next to
each other (by design) are now spread all over the place.  It makes it
VERY hard to inspect/change files with MODIFY.  Is there anything I
can do to fix this?

Yes, set up associations (look them up in the manual for authoritative descriptions).  I believe that MODIFY respects these, but if not then Anji does ;-)


 
 I can deal with all the single-valued fields
listing first (although that would not have been my first choice), but
it's almost impossible to use MODIFY for the multi-valued fields
because I can't find the field I want to inspect/change (there are
about 100 single-valued fields and 100 multi-valued fields).  Any
suggestions?

Gary





--
Ashley Chapman

tomh

unread,
Jul 20, 2009, 10:21:38 AM7/20/09
to OpenQM-OpenSource
Hi,

What Ashley said is correct.

Here is a working example, if you are using 'D' type dictionary items.

The file, how 'MODIFY' looks when updating this file, and a couple of
associated dictionary items.

HTH

Tom H

LIST DICT
TABLES Page 1
@ID......... TYPE LOC........... CONV.. NAME........ FORMAT S/M
ASSOC...
@ID D 0 TABLES 30L S
COLS D 1 COLS 3R M
COLS
ROW D 2 ROW 3R S
WIDTH D 3 WIDTH 3R S
DEPTH D 4 DEPTH 3R S
ATTRS D 5 ATTRS 3R M
COLS
LABELS D 6 LABELS 10L M
COLS
BOX D 7 BOX 2L S
CONVS D 8 CONVS 4L M
COLS
LRJL D 9 LRJL 4L M
COLS
STEP D 10 STEP# 3R S
LOOKUP D 11 LOOKUP 20L M
COLS
CHOICES D 12 CHOICES 20L M
COLS

13 record(s) listed

MODIFY TABLES

TABLES: BANKS.PHONE.TABLE
1: ROW =12
2: WIDTH=70
3: DEPTH=3
4: BOX =N
5: STEP#=8
6> COLS, ATTRS, LABELS, CONVS, LRJL, LOOKUP, CHOICES

...

Action(n/FI/Q/?):

MODIFY TABLES

TABLES: BANKS.PHONE.TABLE
COLS ATTRS LABELS.... CONVS LRJL LOOKUP..............
CHOICES............
1: 7 7 Phones UPHOC l#15
2: 30 8 Contact l#25

...

Modify item(n/In/Dn/E/?):

:ED DICT TABLES COLS
DICT TABLES COLS
7 line(s)
----: P
0001: D
0002: 1
0003:
0004: COLS
0005: 3R
0006: M
0007: COLS
Bottom at line 7
----: EX
:ED DICT TABLES LABELS
DICT TABLES LABELS
7 line(s)
----: P
0001: D
0002: 6
0003:
0004: LABELS
0005: 10L
0006: M
0007: COLS
Bottom at line 7
----: EX

Gary

unread,
Jul 20, 2009, 12:03:17 PM7/20/09
to OpenQM-OpenSource

On Jul 20, 9:34 am, Ashley Chapman <ash.chap...@gmail.com> wrote:
>
> Yes, set up associations (look them up in the manual for authoritative
> descriptions).  I believe that MODIFY respects these, but if not then Anji
> does ;-)
> Ashley Chapman

Ashley,

Thanks. I'll see where that is appropriate, but I really need the
behavior of MODIFY when the association is blank to be more
predictable. I'm going to look at the MODIFY code and see if I can
fix this without a major rewrite as right now it is just silly (I
can't see any rhyme or reason to the ordering, although there must be
SOME as it appears to be deterministic :-) ).

Gary

Ashley Chapman

unread,
Jul 20, 2009, 12:15:35 PM7/20/09
to openqm-o...@googlegroups.com


2009/7/20 Gary <gwal...@gmail.com>


The field ordering is probably just the order in which the dictionary items read from file.  As the dicts are hashed files, this order in predictable -  just not very useful. 

An alternative to try is to create a phrase (PH record) in the dict which defines your preferred order.  You might be able to create this pragmatically yourself, which might be better than hacking MODIFY.  I've done this myself on a Prime years ago, and I suspect QM works the same way.
 


Gary





--
Ashley Chapman

Gary

unread,
Jul 20, 2009, 12:47:32 PM7/20/09
to OpenQM-OpenSource


On Jul 20, 12:15 pm, Ashley Chapman <ash.chap...@gmail.com> wrote:
> An alternative to try is to create a phrase (PH record) in the dict which
> defines your preferred order.  You might be able to create this
> pragmatically yourself, which might be better than hacking MODIFY.  I've
> done this myself on a Prime years ago, and I suspect QM works the same way.
>
> --
> Ashley Chapman

I'll look into that, thanks.

Gary
Reply all
Reply to author
Forward
0 new messages