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 » set message context partially

Post new topic  Reply to topic Goto page 1, 2  Next
 set message context partially « View previous topic :: View next topic » 
Author Message
mq4you
PostPosted: Fri Dec 15, 2006 5:47 am    Post subject: set message context partially Reply with quote

Novice

Joined: 27 Nov 2006
Posts: 11

hello experts!

is there a way to just set some fields of the message context and let the queue manager set the putDate and putTime?

thanks
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Fri Dec 15, 2006 5:52 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Yes.....what fields did you have in mind?

Have you read the fine manual? (Application Programming Reference)

As for the put time and date, the Qmgr already does fill these in.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 15, 2006 5:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

By default, the queue manager sets date & time on PUT. AFAIK there's no way to actually stop it doing that...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 15, 2006 5:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kevinf2349 wrote:
Have you read the fine manual? (Application Programming Reference)


This is of course the fastest way of answering questions like this. Along with the Application Programming Guide.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mq4you
PostPosted: Fri Dec 15, 2006 6:00 am    Post subject: Reply with quote

Novice

Joined: 27 Nov 2006
Posts: 11

i would like to set the field PutApplName and let the queue manager set the other fields.

for that one need to use the open and put option set all context. but if i use it, putDate/Time are blank.

that's why i ask.
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Dec 15, 2006 6:01 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

If you use MQOO_SET_ALL_CONTEXT, then the qmgr does not set PutDate and Time ... he wants to be able to specify "some" fields (perhaps userid?) and not have to set putdate/time.... until he tells us exactly which fields he wants to set, we can't fully answer the question (outside of: yes, you can set identify context and allow the qmgr to set origin context).
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
wschutz
PostPosted: Fri Dec 15, 2006 6:02 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

mq4you wrote:
i would like to set the field PutApplName and let the queue manager set the other fields.

for that one need to use the open and put option set all context. but if i use it, putDate/Time are blank.

that's why i ask.
Ok, then the answer is NO... if you use that SET_ALL_context, then you are responsible for all context fields ...
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Vitor
PostPosted: Fri Dec 15, 2006 6:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Why set PutApplName? It's not the most common requirement to allow the putting application to "pretend" to be another application. If you've got data to store there are better places in the MQMD to put it.

What put option context options have you specified?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mq4you
PostPosted: Fri Dec 15, 2006 6:14 am    Post subject: Reply with quote

Novice

Joined: 27 Nov 2006
Posts: 11

what other places do you mean?

on open and put: MQxx_SET_ALL_CONTEXT

the default behaviour is that the qm or client set the identity and origin fields. for that, the necessary information is taken from the environment.
where is that information stored for windows and unix?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 15, 2006 6:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mq4you wrote:
what other places do you mean?


I was thinking of the ApplOriginData & ApplIdentityData fields.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mq4you
PostPosted: Fri Dec 15, 2006 6:23 am    Post subject: Reply with quote

Novice

Joined: 27 Nov 2006
Posts: 11

actually,

mq doc says that for changing the mqopen and put options the user has to have the right authority.

which authority?
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Dec 15, 2006 6:26 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/amqzag08146.htm
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Vitor
PostPosted: Fri Dec 15, 2006 6:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mq4you wrote:
which authority?


Oddly enough, set authority....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Dec 15, 2006 6:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor wrote:
By default, the queue manager sets date & time on PUT. AFAIK there's no way to actually stop it doing that...


In fact, I know it's possible. I don't know *how*, but in some manner or another a COBOL program at my current site is sending NULL PutDate and PutTimes.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 15, 2006 6:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
Vitor wrote:
By default, the queue manager sets date & time on PUT. AFAIK there's no way to actually stop it doing that...


In fact, I know it's possible. I don't know *how*, but in some manner or another a COBOL program at my current site is sending NULL PutDate and PutTimes.


It is indeed. Taking my own advice (RTFM) you can deliberately set NO_CONTEXT and prevent the setting. Never seen it done and assumed it couldn't be.

I accept it's Friday, and time for some humble pie.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ API Support » set message context partially
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.