Author |
Message
|
mq4you |
Posted: Fri Dec 15, 2006 5:47 am Post subject: set message context partially |
|
|
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 |
|
 |
kevinf2349 |
Posted: Fri Dec 15, 2006 5:52 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 5:52 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 5:56 am Post subject: |
|
|
 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 |
|
 |
mq4you |
Posted: Fri Dec 15, 2006 6:00 am Post subject: |
|
|
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 |
|
 |
wschutz |
Posted: Fri Dec 15, 2006 6:01 am Post subject: |
|
|
 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 |
|
 |
wschutz |
Posted: Fri Dec 15, 2006 6:02 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 6:05 am Post subject: |
|
|
 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 |
|
 |
mq4you |
Posted: Fri Dec 15, 2006 6:14 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 6:18 am Post subject: |
|
|
 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 |
|
 |
mq4you |
Posted: Fri Dec 15, 2006 6:23 am Post subject: |
|
|
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 |
|
 |
wschutz |
Posted: Fri Dec 15, 2006 6:26 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 6:26 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Fri Dec 15, 2006 6:31 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 6:37 am Post subject: |
|
|
 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 |
|
 |
|