Author |
Message
|
Amycal |
Posted: Mon Jun 21, 2010 4:36 am Post subject: How to Reset mqia_def_persistence? |
|
|
Newbie
Joined: 21 Jun 2010 Posts: 4
|
Hello all
I am using MA18 Rexx interface to Reset mqia_def_persistence (I know it is a Boolean Values, 0, 1).
I am also fully aware that, it is better for application to dictate message's "Persistenceness"
Here is code;
opt = mqoo_set
FUNC = 'OPEN'
RCC = RXMQV(FUNC, QNM, OPT, 'HANDLE', 'OOD.')
FUNC = 'SET'
RCC = RXMQV(FUNC, HANDLE,MQIA_DEF_PERSISTENCE,0)
RC is 2067 2 2067 RXMQVSET FAILED (It tells me there is something wrong with SELECTOR)
I know code works, since I've managed to change the MQIA_TRIGGER_DEPTH (Ok, not a Boolean value)
My questions;
1) Is it possible to reset MQIA_DEF_PERSISTENCE?
2) If yes, what am I doing wrong?
Thanks & kind regards
Amy |
|
Back to top |
|
 |
zpat |
Posted: Mon Jun 21, 2010 4:49 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Try using the REXX symbolic name, which should be provided, for this value.
Remember that REXX treats everything as a string. You could try passing '0' to make sure it is formatted as a string in a predictable way. |
|
Back to top |
|
 |
Amycal |
Posted: Mon Jun 21, 2010 4:56 am Post subject: |
|
|
Newbie
Joined: 21 Jun 2010 Posts: 4
|
Thanks Zpat, I've already tried that, and every other possible combination. Just can not see it, or just do not know enough!!
zpat wrote: |
Try using the REXX symbolic name, which should be provided, for this value.
Remember that REXX treats everything as a string. You could try passing '0' to make sure it is formatted as a string in a predictable way. |
|
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Jun 21, 2010 5:25 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
Reset mqia_def_persistence? |
I'm not sure I understand what you are trying to accomplish here.
The persistence field in the MQMD can be seeded with three values, and mqia_def_persistence is one of them. What do you mean by 'reset?' Do you want set the value to something else? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Amycal |
Posted: Mon Jun 21, 2010 5:41 am Post subject: |
|
|
Newbie
Joined: 21 Jun 2010 Posts: 4
|
what I like to do is if the current setting is to i.e. set to 1 Reset to 0. What are the other 2 values for seeding? Do i need to reset all 3 values to make a queue non persistence?
bruce2359 wrote: |
Quote: |
Reset mqia_def_persistence? |
I'm not sure I understand what you are trying to accomplish here.
The persistence field in the MQMD can be seeded with three values, and mqia_def_persistence is one of them. What do you mean by 'reset?' Do you want set the value to something else? |
|
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Jun 21, 2010 6:19 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Take a look at the WMQ Application Programming Reference manual. Look for the MQMD definition. Look for the persistence field.
The mqia_ is one of the possible integer valuea for this field. The WMQ Constants manual describes the logical names and values for this field. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Amycal |
Posted: Mon Jun 21, 2010 7:16 am Post subject: |
|
|
Newbie
Joined: 21 Jun 2010 Posts: 4
|
Sorry I've looked everwhere, do you have a link for WMQ Constants manual.
What would happene, If a message is non Persistence (set by application code), but the queue is persistence?
bruce2359 wrote: |
Take a look at the WMQ Application Programming Reference manual. Look for the MQMD definition. Look for the persistence field.
The mqia_ is one of the possible integer valuea for this field. The WMQ Constants manual describes the logical names and values for this field. |
|
|
Back to top |
|
 |
exerk |
Posted: Mon Jun 21, 2010 7:31 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Amycal wrote: |
Sorry I've looked everwhere, do you have a link for WMQ Constants manual. |
Info Centre links are at the top of the page...
Amycal wrote: |
What would happen, If a message is non Persistence (set by application code), but the queue is persistence? |
Nothing. If an application explicitly sets the persistence value it will over-ride the setting on the queue, e.g. if queue persistence value is set to PERSISTENT and the application sets the message as NON-PERSISTENT then the message will be NON-PERSISTENT - and vice versa.
MESSAGES are persistent or not, QUEUES have no perception of persistence. DEFPSIST can be considered to be a place-holder for the value to be set for lazy programming - my personal view is that it should always be set explicitly by the application.
I may seem to have laboured the point somewhat, but I believe this is one of the most misunderstood elements of the relationship between messages, queues and persistence. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 21, 2010 7:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
exerk wrote: |
I may seem to have laboured the point somewhat, but I believe this is one of the most misunderstood elements of the relationship between messages, queues and persistence. |
Only messages are persistent or not persistent. Queues are queues. Queues have a default setting for persistence, but that's the setting the MQPUT call uses to set message persistence if the application doesn't explicitly set it.
There has been much discussion of this in here over the years. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Jun 21, 2010 7:59 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
Queues have a default setting for persistence |
No, no, no. This is not a default; rather, it is an initial value. It is up to the app developer set the MQMD field for each message to one of these:
1) this is a non-persistent message
2) this is a persistent message
3) this message is to take the persistence attribute of the queue
Belabored again. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 21, 2010 8:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bruce2359 wrote: |
Belabored again. |
I thought I'd laboured that enough with my explaination of how the MQPUT call used it, but the subject is a rock that'll take plenty of hits with a sledgehammer. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|