ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Message SELECT

Post new topic  Reply to topic
 Message SELECT « View previous topic :: View next topic » 
Author Message
bobbee
PostPosted: Fri Jul 01, 2016 11:16 am    Post subject: Message SELECT Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

I have a file I have read into Environment. I am writing a query against the data using a SET/SELECT. In the debugger I can see it running through the elements. What I want is a list of all the VALUES that have a RuleID=2 and a VarID = 1. Here is the code and a snippet of the Environment data. I put the CAST in there on my last run, trying different things.

Code:

SET Environment.AccounttProdTypeIMList[] =
           SELECT Value
             FROM Environment.SV.DFDL.SCORE_VALUE.record[]    AS two
               WHERE two.RuleID = CAST('2' AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding) and
                  two.VarId  = CAST('1'  AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


Code:

SV
   DFDL
            SCORE_VALUE
                  record
                        ScoreModel:CHARACTER:4
                        RuleId:CHARACTER:1
                        VarId:CHARACTER:0
                        Value:CHARACTER:966
                  record
                        ScoreModel:CHARACTER:4
                        RuleId:CHARACTER:2
                        VarId:CHARACTER:0
                        Value:CHARACTER:IM
                  record
                        ScoreModel:CHARACTER:4
                        RuleId:CHARACTER:2
                        VarId:CHARACTER:1
                        Value:CHARACTER:107
                  record
                        ScoreModel:CHARACTER:4
                        RuleId:CHARACTER:2
                        VarId:CHARACTER:1
                        Value:CHARACTER:108
Back to top
View user's profile Send private message Send e-mail AIM Address
mqjeff
PostPosted: Fri Jul 01, 2016 11:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

"SELECT two.Value"
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
bobbee
PostPosted: Fri Jul 01, 2016 11:34 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

I had two.Value. But I just went back and added it back in. i still get nothing.
Back to top
View user's profile Send private message Send e-mail AIM Address
bobbee
PostPosted: Fri Jul 01, 2016 11:37 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

FYI,
When I am in the DEBUGGER, as soon as the FROM is executed I see in the DEBUG session a reference variable named 'one' and in it I see the current record. As I step through the iteration, i see the values change untill I get to 2,1. It just keeps going and returns nothing.
Back to top
View user's profile Send private message Send e-mail AIM Address
mqjeff
PostPosted: Fri Jul 01, 2016 11:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

is "Value" the name of a child of record?

or the value of the field "record"?

If it's the second, you might need to select from Environment.SV.DFDL.SCORE_VALUE.* instead of Environment.SV.DFDL.SCORE_VALUE.record
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
bobbee
PostPosted: Fri Jul 01, 2016 11:57 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

It should be a child, how does one tell the difference.
Back to top
View user's profile Send private message Send e-mail AIM Address
bobbee
PostPosted: Fri Jul 01, 2016 12:38 pm    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

RuleID != RuleId

Thanks!!!

Second Question.

I am getting repeating:

AccounttProdTypeIMList
Value:CHARACTER:107
AccounttProdTypeIMList
Value:CHARACTER:108
etc.

Which is sort of what I expected. Can I change the output to just an ARRAY of the returned values?

AccounttProdTypeIMList(1) = 107
AccounttProdTypeIMList(2) = 108
etc

??????????
Back to top
View user's profile Send private message Send e-mail AIM Address
maurito
PostPosted: Mon Jul 04, 2016 4:21 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

bobbee wrote:
RuleID != RuleId

Thanks!!!

Second Question.

I am getting repeating:

AccounttProdTypeIMList
Value:CHARACTER:107
AccounttProdTypeIMList
Value:CHARACTER:108
etc.

Which is sort of what I expected. Can I change the output to just an ARRAY of the returned values?

AccounttProdTypeIMList(1) = 107
AccounttProdTypeIMList(2) = 108
etc

??????????

Yes you can.
Question:
What is the point of
Code:
CAST('2' AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding)

What do you think the result will be ?
Similarly for the other CAST.
Back to top
View user's profile Send private message
bobbee
PostPosted: Mon Jul 04, 2016 5:09 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

When you are in a corner you try things that may be silly but they eliminate random conflicting thoughts in your head.

Your kind of late with the comment, even after my last post. I got it working on my own. Thanks for all that input. Very helpful......................
Back to top
View user's profile Send private message Send e-mail AIM Address
maurito
PostPosted: Mon Jul 04, 2016 5:18 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

bobbee wrote:
When you are in a corner you try things that may be silly but they eliminate random conflicting thoughts in your head.

Your kind of late with the comment, even after my last post. I got it working on my own. Thanks for all that input. Very helpful......................

Your post was Friday, and some of us have a job to do. We are not a 'help desk', so you can keep your sarcasm to yourself. And by the way, it is You are kind of late, not YOUR.
Back to top
View user's profile Send private message
bobbee
PostPosted: Mon Jul 04, 2016 7:58 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

some of us are dedicated and do this 24x7. Sarcasm is my best personality trait. Almost trumps my IT skills. Now look at that, you've gone from being a programmer to an English teacher on one post. Amazing.
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Message SELECT
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.