Object Exports

Object exports turn the invisible repository inside a queue manager into files humans and pipelines can read, diff, and replay. When you inherit a fifteen-year-old queue manager nobody documented, export is how you discover four hundred queues and eighty channels before changing anything. When you migrate from on-prem to cloud, export is the starting point for edited DEFINE scripts on the new platform. When auditors ask what production looked like last Tuesday, export snapshots answer. IBM MQ offers multiple export paths—SAVEOBJECT in MQSC, dmpmqcfg utilities, MQ Explorer wizards, PCF bulk inquire converted to scripts, REST JSON downloads—each with different completeness and format. This tutorial compares export methods, explains how to convert DISPLAY output into DEFINE scripts, sanitize host-specific values for migration, integrate exports with Git and CI drift detection, and avoid common traps like exporting without authority records or keystores then wondering why restore fails authentication.

Why Export Instead of Only Backing Up Files

Binary repository files in the queue manager directory are not friendly for code review. Text exports diff in Git pull requests: you see MAXDEPTH changed from 50000 to 100000. Exports also restore across platforms when file paths differ—MQSC is more portable than raw directory copy between Windows and Linux. File backup still matters for disaster recovery speed; exports matter for governance and migration clarity.

Export methods compared
MethodOutput formBest for
SAVEOBJECTMQSC-like file from QMQuick full snapshot on supported releases
dmpmqcfg / crtmqcfgStructured config dumpDistributed backup/restore pairs
Explorer exportSelected MQSC textAd hoc, legacy discovery
Scripted DISPLAYCustom filtered listsPartial exports (channels only)
REST GETJSONCloud pipelines, OpenAPI tools

SAVEOBJECT and MQSC Export

SAVEOBJECT saves definitions from the active repository to a path the queue manager can write—often on the server filesystem, not your laptop unless shared mount. Parameters control which objects and whether security definitions are included per IBM documentation. After export, copy the file to secure backup storage. Import on another queue manager may use corresponding load commands or manual runmqsc editing. Test round-trip in lab: export QM_TEST, create QM_RESTORE empty, import, compare DISPLAY counts.

shell
1
2
3
/* Example pattern — verify exact syntax on your MQ version */ SAVEOBJECT('*') OBJTYPE(ALL) PATH('/var/mqm/export/qm1-full.mqsc') /* Review file on server; transfer to Git after sanitization */

From DISPLAY to DEFINE Scripts

Manual method: DISPLAY QLOCAL(*) ALL, capture output, hand-convert to DEFINE QLOCAL(...) REPLACE with attributes. Error-prone at scale. Scripts and third-party tools parse DISPLAY into DEFINE. Partial exports list only payment queues matching PAY.*. Use for compliance reports listing channel CONNAME and SSL settings. Always add REPLACE for idempotent re-import unless creating fresh QM.

Explainer: Printing the Furniture Catalog

Object export is printing the catalog of every mailbox and hallway in the building—not shipping the letters inside the boxes.

Migration Sanitization Checklist

  1. Replace queue manager name in objects that embed QM name.
  2. Update CONNAME hostnames and ports for new data center.
  3. Adjust SSLKEYR paths and certificate labels.
  4. Remove test queues or obsolete partners from export.
  5. Regenerate setmqaut or RACF scripts for target environment IDs.
  6. Validate cluster names if moving out of cluster.

PCF and REST Bulk Export

Custom Java or Python programs loop PCF inquire all queues and emit JSON or MQSC. REST admin GET collections with pagination suit cloud automation. Handle rate limits and command server load. Store output in artifact bucket with timestamp. Drift detection job diffs today’s JSON to main branch and opens ticket if different.

Security in Export Files

Exports may list AUTHINFO LDAP bind DNs, channel certificates labels, and partner IP addresses—classify exports as confidential. Redact before attaching to public tickets. Do not store in unencrypted object storage. Keystore passwords must never appear in MQSC; if they do, rotate immediately.

Partial Versus Full Export

  • Full — disaster recovery baseline, annual archive.
  • Channels only — network documentation refresh.
  • Queues matching pattern — application team handoff.
  • Security AUTHREC — access recertification evidence.

Import and Validation

After import, run scripts that COUNT objects and compare to export manifest. START channels in test. Application teams run regression. Compare dspmqaut to expected matrix. Only then promote import script to production change window.

Troubleshooting Exports

  • Empty file — wrong PATH or authority to write directory.
  • Import fails syntax — version mismatch; edit unsupported attributes.
  • Missing objects — export filter too narrow or SAVEOBJECT scope limited.
  • Duplicate object on import — use REPLACE or DELETE first in target.

Explain Like I'm Five: Object Exports

Object export is writing down a list of every mailbox name and rule so you can build the same post office somewhere else.

Practice Exercises

Exercise 1

Export lab QM with your site’s standard tool; count queues in file versus DISPLAY QLOCAL(*).

Exercise 2

Edit export for migration: change two CONNAME values and document why.

Exercise 3

Design a weekly drift job comparing export hash to Git main.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. Object export contains:

  • Definitions not messages
  • All message bodies
  • Only TLS keys
  • RACF only

2. SAVEOBJECT is:

  • MQSC export to file
  • MQPUT
  • CLEAR queue
  • START listener

3. Migration export must edit:

  • CONNAME and QM names
  • Nothing
  • Only DESCR
  • COBOL copybooks

4. Explorer export helps:

  • Bootstrap Git from legacy QM
  • Encrypt messages
  • Replace OAM
  • Delete logs
Published
Read time21 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation