MULTIVALUE FIELDS NOT BEING DISPLAYED IN ENQUIRY IN GLOBUS.

3,125 views
Skip to first unread message

prabal_482

unread,
Nov 18, 2007, 12:50:13 AM11/18/07
to jBASE
hi,

I created a routine which returns an array of single as well as multi
value fields. In globus, i created an enquiry which displays the
fields returned by the routine. The problem is that i am able to
display the single value field , whereas only first field is displayed
of the multi value. I need to display fields as below:
<single value> <single value> <multi value1> <single value> ...
<multi value2>
<multi value3>
-----------------------------------------------------------------------------------------------------------------------------------
however im getting my output as:

<single value> <single value> <multi value1> <single value> ...

other multi value fields are missing... i have also specified M for
MultiValue in Globus.

If anyone can help solve my problem, i will be very grateful.
Any comment is welcome.

Daniel Klein

unread,
Nov 18, 2007, 7:09:42 AM11/18/07
to jB...@googlegroups.com
Sounds like a bug in the 'routine'. Can we see it along with a sample
of the data it is working on?

Dan

icht...@yahoo.com

unread,
Nov 19, 2007, 4:22:58 AM11/19/07
to jBASE
The common variable VM.COUNT from I_ENQUIRY.COMMON tells Globus on a
field level how many multi values a line in the enuqiry has. Therefore
you need to write a small routine, which you attach to the CONVERSION
field in the ENQUIRY record, within the multivalue set that is
displaying your multivalued field, with the following code:

$INSERT I_ENQUIRY.COMMON

VM.COUNT=DCOUNT(O.DATA,@VM)


This should fix the display issue.


Regards,

Ryan

raphael olapade

unread,
Nov 19, 2007, 7:12:59 AM11/19/07
to jB...@googlegroups.com
Hi,

The suggestion made earlier should fix the issue but from your enquiry
try to attached your routine at the point of where you want the multi
value field to be display. And you must make sure you first of ALL
pass the record identification to "O.DATA" first right from your
enquiry where the routine is attached.

I asumed where you attached your routine carry along the record.Id.

INSERT I_ENQUIRY.COMMON

***NOTE Y.REC.ID is the record.id that you are bringing from your enquiry ****
Y.REC.ID = O.DATA

**** Then Read the table where the multi value field is coming from ****

VM.COUNT=DCOUNT(O.DATA,@VM)


This should fix the display issue.

Regards

Sege


--
Olapade R.S
2, Akinfemi Salvage Str
Fagba Bus Stop, Iju RD, Lagos
Tel No:234-1-(0)8033087434/8051144422

FY Choong

unread,
Dec 3, 2007, 5:17:57 AM12/3/07
to jB...@googlegroups.com
Hi,
Pardon me for being ignorant. I also have the same problem and tried
the way mentioned below, but it seems the multivalue field did display
in a multi rows but unfortunately it's of same value. Example :-

In enquiry, column 2, O.DATA = 1M]3M]6M]12M , delimiter by VM marker.
In the CONVERSION field of ENQUIRY, i wrote a routine as below :-

MV.FLD = O.DATA
VM.COUNT=DCOUNT(MV.FLD,VM)

My enquiry output will be :-
EUR | 1M
1M
1M
1M

I also tried to pass in the record ID and read and then do a count, it
produce the same result.

In ENQUIRY, column 2, S/M indicator is set as M.

Have I missed out any step ?

Thanks for clarifying.


--
Thank you and Regards,
Foong Yee

raphael olapade

unread,
Dec 3, 2007, 7:32:29 AM12/3/07
to jB...@googlegroups.com
Hi,

No you are not being ignorant. Because this is forum to share idea/knowledge.

Note, In your enquiry you can displayed ALL the multi value content by mere selecting the field and set indicator to M. The system will display all the content for you by default; however; if you need ONLY certain data in the multi value field that is the time you will now introduce DCOUNT in the small routine u intend to use.

Take example this small routine. I intend to get the "number of Installment" from LMM.SCHEDULE.DATES

But initially i had passed CONTRACT.NO./LD record ID to O.DATA

YLD.ID =  O.DATA

Then with this i can now read/select LD table with that record key then if the LD exist concatenate "00" to it like

 YLMM.ID = YLD.ID:'00'

*GET LMM.SCHEDULE.DATES DATA
*=============================
        YDROP = 0
        IF YLMM.ID THEN

          YLD.INST.NO = ''
'
            READ RLMM.DATES.REC FROM F.LMM.DATES, YLMM.ID THEN
                YLM.REC1 = ''
                YLMM.DATES.COUNT = DCOUNT(RLMM.DATES.REC,@VM)
                YLM.REC1 = RLMM.DATES.REC[9,1]
                IF YLM.REC1 EQ 'D' THEN
                    YDROP += 1
                END
                YLD.INST.NO = YDROP:YHIF:YLMM.DATES.COUNT
                O.DATA = YLD.INST.NO
            END
        END

From the above i think you should be able to understand the concept of how to handle multi value fields.


thanks and regard

Sege
Tel No:234-1-(0)8033087434/8051144422

FY Choong

unread,
Dec 3, 2007, 10:10:11 AM12/3/07
to jB...@googlegroups.com
Hi,
Thank you very much for your prompt reply.

But I still don't know why my routine does not display as how it should be.

Example, my nofile enquiry will passed out all the relevant records,
in a string format like EUR*1M]3M]6M]12M

Then in enquiry designer, Column 1 = ID, i will use FIELD to split the
value using "*" Delimiter and for Column 2, i split as FIELD "*",2,1
under CONVERSION field. I also append the conversion of multi value as
:-

** In MV.FLD variable, the value is 1M]3M]6M]12M **

MV.FLD = O.DATA
VM.COUNT=DCOUNT(MV.FLD,VM)
FOR M = 1 TO VM.COUNT
IF YSTR THEN
YSTR := VM : MV.FLD<1,M>
END ELSE
YSTR = MV.FLD<1,M>
END
NEXT M
O.DATA = YSTR

But my enquiry output will displayed as below, which is wrong :-

CHF 1M 3M 6M 12M
1M 3M 6M 12M
1M 3M 6M 12M
1M 3M 6M 12M

I need the enquiry to display as :-
CHF 1M
3M
6M
12M

In enquiry designer i already set as below :-
14. 2 FIELD.NAME..... REST.PERIOD
15. 2. 1 OPERATION... 0
16. 2 COLUMN......... 18
17. 2 LENGTH.MASK.... 50L
18. 2. 1 CONVERSION.. F *,2,1
18. 2. 2 CONVERSION.. @ E.CONV.MV.FLDS
35. 2 SINGLE.MULTI... M

Please advice.

Thank you.

icht...@yahoo.com

unread,
Dec 4, 2007, 10:06:54 AM12/4/07
to jBASE
Here's another option that seems to work.

Change the routine E.CONV.MV.FIELDS as follows:

SUBROUTINE E.CONV.MV.FIELDS
*
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
*
R.RECORD<1> = O.DATA
CONVERT " " TO @VM IN R.RECORD<1>
VM.COUNT = DCOUNT(R.RECORD,@VM)
*
RETURN
*
END

Then remove the value of 16.2, and change 35.2 to be "S" (this is so
that the routine only runs once) and it looks as follows:

14. 2 FIELD.NAME..... REST.PERIOD
15. 2. 1 OPERATION... 0
16. 2 COLUMN.........
17. 2 LENGTH.MASK.... 50L
18. 2. 1 CONVERSION.. F *,2,1
18. 2. 2 CONVERSION.. @ E.CONV.MV.FLDS
35. 2 SINGLE.MULTI... S



You then need to create a 3rd set that looks like this:

14. 3 FIELD.NAME..... D.REST.PERIOD
15. 3. 1 OPERATION... 1
16. 3 COLUMN......... 18
17. 3 LENGTH.MASK.... 50L
18. 3. 1 CONVERSION..
18. 3. 2 CONVERSION..
35. 3 SINGLE.MULTI...

By using 1 in operation the ENQUIRY application will use field 1 of
R.RECORD, which is also a common variable defined in I_ENQUIRY.COMMON.

Regards,

Ryan
> > On 03/12/2007, FY Choong <fycho...@gmail.com> wrote:
>
> > > Hi,
> > > Pardon me for being ignorant. I also have the same problem and tried
> > > the way mentioned below, but it seems the multivalue field did display
> > > in a multi rows but unfortunately it's of same value. Example :-
>
> > > In enquiry, column 2, O.DATA = 1M]3M]6M]12M , delimiter by VM marker.
> > > In the CONVERSION field of ENQUIRY, i wrote a routine as below :-
>
> > > MV.FLD = O.DATA
> > > VM.COUNT=DCOUNT(MV.FLD,VM)
>
> > > My enquiry output will be :-
> > > EUR | 1M
> > > 1M
> > > 1M
> > > 1M
>
> > > I also tried to pass in the record ID and read and then do a count, it
> > > produce the same result.
>
> > > In ENQUIRY, column 2, S/M indicator is set as M.
>
> > > Have I missed out any step ?
>
> > > Thanks for clarifying.
>
> > > On 11/19/07, raphael olapade <rsolap...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > The suggestion made earlier should fix the issue but from your enquiry
> > > > try to attached your routine at the point of where you want the multi
> > > > value field to be display. And you must make sure you first of ALL
> > > > pass the record identification to "O.DATA" first right from your
> > > > enquiry where the routine is attached.
>
> > > > I asumed where you attached your routine carry along the record.Id.
>
> > > > INSERT I_ENQUIRY.COMMON
>
> > > > ***NOTE Y.REC.ID is the record.id that you are bringing from your
> > enquiry ****
> > > > Y.REC.ID = O.DATA
>
> > > > **** Then Read the table where the multi value field is coming from ****
>
> > > > VM.COUNT=DCOUNT(O.DATA,@VM)
>
> > > > This should fix the display issue.
>
> > > > Regards
>
> > > > Sege
>

FY Choong

unread,
Dec 4, 2007, 12:03:03 PM12/4/07
to jB...@googlegroups.com
Hi,
Extremely cool !! it works perfectly.

Thanks to everyone's help and contribution !

Cheers !

Reply all
Reply to author
Forward
0 new messages