Hi Gloria
As Prasad mentioned, QMF for Workstation is going to have a utility coming out to address bulk migrations of QMF objects in an upcoming release. We hope to have a similar tool for QMF for TSO in the future.
I wanted to expand on Wesley's method a bit with a little beware and workaround. I was not clear if the target QMF had existing QMF objects already in the catalog. If so, just be careful with the SAVE DATA defaults as that will overwrite your existing QMF catalog objects. Here is a similar method that I have given to users over the years which will not overwrite any existing QMF objects in the target server. For this case, the users had QMF objects in the target and wanted to bring a bunch of new QMF objects into the existing catalog.
As everyone has mentioned, it takes the info in the 3 QMF catalog tables Q.OBJECT_DATA, Q.OBJECT_REMARKS and Q.OBJECT_DIRECTORY to complete the definition of a QMF object. So you can figure out your object requirements (by owner or name) and run your SELECTs in the source:
SELECT * FROM Q.OBJECT_REMARKS
WHERE OWNER IN ('QMF','RZALUD','TS5519')
Then run the command:
EXPORT DATA TO OBJREM
Run your next query:
SELECT * FROM Q.OBJECT_DATA
WHERE OWNER IN ('QMF','RZALUD','TS5519')
EXPORT DATA TO OBJDATA
And then:
SELECT * FROM Q.OBJECT_DIRECTORY
WHERE OWNER IN ('QMF','RZALUD','TS5519')
EXPORT DATA TO OBJDIR
Sent your 3 exported files to the target. Go into the target QMF and then do:
IMPORT TABLE Q.OBJECT_DIRECTORY
+ FROM 'xyz.OBJDIR' (ACTION=APPEND
IMPORT TABLE Q.OBJECT_DATA
+ FROM 'xyz.OBJDAT' (ACTION=APPEND
IMPORT TABLE Q.OBJECT_REMARKS
+ FROM 'xyz.OBJREM' (ACTION=APPEND
The ACTION=APPEND is crucial as to not wipe out your existing QMF catalog. (It takes the place of the 2 steps of IMPORT DATA/SAVE DATA.)
------------------------------
Robin Zalud
Senior Software Engineer
Rocket Software
rzalud@rocketsoftware.com------------------------------
Original Message:
Sent: Mon August 05, 2024 09:49 AM
From: Phil Sevetson
Subject: DB2 Query Management Facility/QMF for Workstation
Gloria,
Are there enough objects that it's worth building a sequential file with EXPORT statements, another with FTP steps, a third with IMPORT? Or would that be harder than moving each by the traditional steps, one at a time?
Exporting a lot of objects, short version:
- Using DSNTIAUL, you can write a series of EXPORT statements:
SELECT CHAR(
'EXPORT QUERY '
CONCAT RTRIM(OWNER)
CONCAT '.'
CONCAT RTRIM(NAME)
,80
)
FROM Q.OBJECT_DIRECTORY
WHERE ...
- The all-encompassing CHAR function is required here. If you omit it, DSNTIAUL will write the record as a VARCHAR output, and the first (two?) bytes will be a binary value representing the length of the result row.
- These are the columns and properties in Q.OBJECT_DIRECTORY. You can use these in your predicate to pick the objects which you want to export.
Q.OBJECT_DIRECTORY:
Column Name Col No Col Type Length
------------------ ------ -------- ------
OWNER 1 VARCHAR 128
NAME 2 VARCHAR 128
TYPE 3 CHAR 8
SUBTYPE 4 CHAR 8
OBJECTLEVEL 5 INTEGER 4
RESTRICTED 6 CHAR 1
MODEL 7 CHAR 8
CREATED 8 TIMESTMP 10
MODIFIED 9 TIMESTMP 10
LAST_USED 10 TIMESTMP 10
----
This isn't by any means a complete solution; I've only written a sample query to show how DSNTIAUL can be used to create EXPORT statements in a sequential file. Something like this for QMF has been on my "back burner" for a couple of years, and I've never had/taken the time to do it.
Please let me know if you find this helpful, or have further questions. I'll answer as time permits! :-)
/phil
Philip Sevetson
Computer Systems Manager
FISA-OPA
5 Manhattan West
New York, NY 10001
psevetson@fisa-opa.nyc.gov
917-991-7052 (m)

Original Message:
Sent: 8/2/2024 9:22:00 AM
From: Gloria Fries
Subject: DB2 Query Management Facility/QMF for Workstation
Hi,
We are in the process of migrating several DB2 applications from one environment on one LPAR to another. The only way to communicate between the LPARs is FTP.
The applications have many hundreds of QMF procs, queries, forms etc. We're aware of the export and import function available in QMF. We have both the QMF for z/OS and QMF for Workstation.
Is there an easy way to export a large number of QMF objects at once or do we need to do them one at a time?
Thanks,
Gloria Fries
------------------------------
Gloria Fries
------------------------------