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 » IBM MQ API Support » Error using MQSETMP on i5/OS in RPG/ILE

Post new topic  Reply to topic
 Error using MQSETMP on i5/OS in RPG/ILE « View previous topic :: View next topic » 
Author Message
DarkHorse
PostPosted: Wed Nov 10, 2010 2:22 pm    Post subject: Error using MQSETMP on i5/OS in RPG/ILE Reply with quote

Newbie

Joined: 10 Nov 2010
Posts: 2

I am trying to set a message property using RPG calling MQSETMP.
I have issued an MQCONN, MQOPEN, MQCRTMH, and am now issuing the MQSETMP message.
I am getting a "Pointer not set for location referenced." error.
The prototype is as follows:

Code:
DMQSETMP          PR                  EXTPROC('MQSETMP')
D* Connection handle                                     
D HCONN                         10I 0 VALUE             
D* Message handle                                       
D HMSG                          20I 0 VALUE             
D* Options that control the action of MQSETMP           
D SETOPT                        20A   VALUE             
D* Property name                                         
D PRNAME                        32A   VALUE             
D* Property descriptor                                   
D PRPDSC                        24A                     
D* Property data type                                   
D TYPE                          10I 0 VALUE     
D* Length of the Value area                     
D VALLEN                        10I 0 VALUE     
D* Property value                               
D VALUE                           *   VALUE     
D* Completion code                               
D CMPCOD                        10I 0           
D* Reason code qualifying CompCode               
D REASON                        10I 0           


I am calling it with:

Code:
CALLP     MQSETMP(HCONN : HMSG : SETMPOPTS:
          PRNAME : SETMPPD : TYPE : VALLEN :
          VALPTR : CCODE : REASON)         

SETMPOPTS is the DS of CMQSMPOG, and SETMPPD is the DS of CMQPDG with all of the default values.
I have tried TYPE of "String" (1024), and "Byte String" (8). VALLEN is 22. I think my problem is a combination of PRNAME and VALPTR.
In the Prototype, PRNAME is 32A, and I have no idea what to put in there, so I am putting a string of "JEFFPROPNAME" in it.
I tried to define VALPTR as a pointer to PRPVAL which is 22 long and contains "JEFFPROPVAL".

When I execute, I get this error:
Pointer not set for location referenced.
FDC XY353001 -
xehAS400ConditionHandler(1077960969:1:4:MCH3601:CPF9999:.)

Any insight appreciated. Thanks.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 10, 2010 9:02 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

What does the relevant manual say should be in those fields?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
DarkHorse
PostPosted: Mon Nov 15, 2010 7:17 am    Post subject: Reply with quote

Newbie

Joined: 10 Nov 2010
Posts: 2

That's what I have been trying to decipher. In the manuals it says that PRNAME is:

PRNAME (10-digit signed integer) - input This is the name of the property to set. See Property names and Property name restrictions for further information about the use of property names.

Property names
A property name is a character string. Certain restrictions apply to its length and the set of characters that can be used.
A property name is a case-sensitive character string, limited to +4095 characters

But in the prototype for RPG/ILE it has it defined as 32A.

VALUE (10-digit signed integer) - input The value of the property to be set. The buffer must be aligned on a boundary appropriate to the nature of the data in the value.

I am using VALPTR for the parm in my program.

Code:
D VALPTR          S             16*   INZ (%ADDR(PRPVAL))
D PRPVAL          S             22A                       
...
C                   EVAL      VALLEN = 22             
C                   EVAL      PRPVAL = 'JEFFPROP'     


The pointer error seems to be related to the VALPTR, but I'm not sure.

If somebody has a sample program in RPG that uses MQSETMP, I could figure out what I am doing wrong.

Thanks.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 15, 2010 9:24 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

For the property names have you looked at MQ Constants?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Nov 16, 2010 2:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
For the property names have you looked at MQ Constants?

I don't think that's correct. I believe that message properties can have any name you want them to have.

Looking at the c language invocation, everything other than Hconn, Hmsg, Type and ValueLength are passed as pointers. It's not too clear if you are sending PRNAME as a reference or as a plain string, it should be a reference.

Disclaimer, I don't know RPG.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Error using MQSETMP on i5/OS in RPG/ILE
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.