# MQRC 2047: Persistence value not valid

Source: https://wndsoftware.com/mainframe-errors/mqrc-2047

### MQRC 2047: Persistence value not valid

MQRC 2047 means MQMD.Persistence contains an invalid value. Initialize the descriptor and use a supported persistence constant before putting.


#### Other names for this code

Also written as `RC2047`, `reason code 2047`, `MQ error 2047`, `MQRC_PERSISTENCE_ERROR`, `07FF`, `0x07FF`.


### What it means

MQPUT or MQPUT1 rejected the Persistence field in MQMD. IBM specifies persistent, nonpersistent or queue-default persistence as the supported choices. The reason is about the field value, not whether the queue has enough storage.

A valid persistence value can still be unsuitable for a particular destination. That different case can produce MQRC 2048, particularly with temporary dynamic queues.


#### A troubleshooting example

A settings page stores persistence as the words durable and transient. A wrapper expects an MQ integer, but a failed conversion leaves an unsupported value in MQMD. Reason 2047 then appears as a production send failure. Map each supported application setting explicitly to the correct MQ constant and reject unknown settings at startup. Test the default path as well: a missing setting should produce a deliberate policy choice, not uninitialized storage or a silent change in delivery durability.


### Common causes

- An uninitialized descriptor leaves an arbitrary integer in Persistence.
- A configuration string or application enum is passed directly instead of being mapped to an MQ constant.
- A native structure declaration or buffer overwrite corrupts the field before MQPUT.


### How to find the problem

- Log MQMD.Persistence immediately before the put. Compare the value with the constants supplied by the deployed MQ library.
- Trace how configuration is mapped to that field. Check blank input, default branches and numeric conversion errors.
- Initialize a fresh descriptor and repeat a small test. If that succeeds, compare every later assignment with the failing path.
- If other descriptor fields also look wrong, investigate the MQMD layout and memory ownership rather than fixing one integer in isolation.


### How to fix it

- Set MQPER_PERSISTENT, MQPER_NOT_PERSISTENT or MQPER_PERSISTENCE_AS_Q_DEF according to the approved message contract.
- Validate configuration at startup and reject unsupported values with a clear application error before reaching MQ.
- Keep persistence policy separate from incidental UI labels or language enums. Test the resulting descriptor for every supported configuration choice.


### What it looks like


```text
Illustrative diagnostic notes; not an IBM message template.
MQPUT Reason=2047
Inspect MQMD.Persistence
Use MQPER_PERSISTENT, MQPER_NOT_PERSISTENT
or MQPER_PERSISTENCE_AS_Q_DEF as designed.
```


### IBM documentation

[IBM MQ 9.4: 2047 MQRC_PERSISTENCE_ERROR](https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=codes-2047-07ff-rc2047-mqrc-persistence-error). Use the documentation for your installed release.

[Report a correction to WND Software](https://wndsoftware.com/contact#message).

Technical reviewer: [Albert Joseph](https://wndsoftware.com/authors/albert-joseph), WND Software.

Updated 2026-10-23. IBM documentation checked for this article. Written in our own words. For the full reference, check IBM’s MQ documentation for your version.


### Related codes

[MQRC 2048 MQRC_PERSISTENT_NOT_ALLOWED Read →](https://wndsoftware.com/mainframe-errors/mqrc-2048)
[MQRC 2026 MQRC_MD_ERROR Read →](https://wndsoftware.com/mainframe-errors/mqrc-2026)
[MQRC 2056 MQRC_Q_SPACE_NOT_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2056)

### Questions


#### Is 2047 caused by a full disk?

No. It identifies an invalid persistence field value. Storage shortages have different reason codes.


#### Should I always use persistent messages?

Choose according to the delivery and recovery requirements of the application. Correcting an invalid field does not decide the business durability policy.

[IBM MQ reason codes](https://wndsoftware.com/mainframe-errors/mq-reason-codes) · [MQRC 2046](https://wndsoftware.com/mainframe-errors/mqrc-2046) · [MQRC 2048](https://wndsoftware.com/mainframe-errors/mqrc-2048)

[← All error codes](https://wndsoftware.com/mainframe-errors/)
