SELECTINDEX / SELECTINDEXV

63 views
Skip to first unread message

Jose Luis

unread,
May 31, 2022, 1:07:00 PM5/31/22
to OpenQM
Hi all

Using SELECTINDEXV

SELECTINDEXV index.name {,value} FROM file.var TO list.var


I'm trying to  use a variable in the index.name using SELECTINDEXV and system returns me the  list.var empty.
If I put the correct literal of the index.name , it works fine. 

It's posible than I can't use a variable here or I'm doing something wrong?

an example:
RREG is file opened above
 DICCIO='CLIENTE':AM:'COMERCIAL':AM:'TIPO':AM:'AJO'
 VAL='02266':AM:'93':AM:'CC':AM:'2022'.
      *.
     $INCLUDE KEYS.H.
      NLISTA='' ; LISTA=''.
      TOPE=DCOUNT(DICCIO,AM).
      FOR X=1 TO TOPE.
         NLISTA = MERGELIST(NLISTA,LISTA,ML$INTER).
          DICO='"':DICCIO<X>:'"'.
          DICO=DICCIO<X>.
         i'll try in the two ways
         VLR=VAL<X>
         CRT DICO,VLR.
         SELECTINDEXV DICO,VLR FROM RREG TO LISTA.
     CRT 'HAY ':@(SELECTED). 
          always returns an empty value
 CRT X:' ':LISTA ; INPUT A,1.
         IF NLISTA='' THEN NLISTA=LISTA.
      NEXT X.
 CRT NLISTA .

Thank you


Martin Phillips

unread,
Jun 1, 2022, 4:25:12 AM6/1/22
to ope...@googlegroups.com

Hi Jose,

 

Try showing the value of the STATUS() function after the SELECTINDEXV. This may show why it is not working.

 

 

Martin

 

From: ope...@googlegroups.com <ope...@googlegroups.com> On Behalf Of Jose Luis
Sent: 31 May 2022 18:07
To: OpenQM <ope...@googlegroups.com>
Subject: SELECTINDEX / SELECTINDEXV

 

EXTERNAL EMAIL




--
You received this message because you are subscribed to the Google Groups "OpenQM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openqm+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openqm/441eb42a-b7c8-42e4-92b5-a4ca1f746a8en%40googlegroups.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.

Jose Luis

unread,
Jun 2, 2022, 10:32:34 AM6/2/22
to OpenQM
Thanks Martin.
I've solved the problem , not with the status() function. 
I am sendind the value with double quotation marks and it was the problem .
I was thinking that the problem was in the index.name nor in the value.

Sorry. And thanks again

Reply all
Reply to author
Forward
0 new messages