Useful QMF Commands

Useful QMF Commands

Below are commonly used QMF commands for quick reference

1. Connect:
To connect to different database other than the default one(e.g.; if the default is DSNS and u want to connect to DB2T)
Then issue the command Connect to DB2T in the QMF main panel.

2. Import :
This is to import the data from a PS into a QMF Object.
Import <Object Type> from <dataset>
Object Type may be DATA,QUERY,TABLE,FORM and PROC
DSName is the TSO data set name.

3. Export:
This is to export the data to a PS from a QMF Object.
Export <Object Type> to <dataset>
To export test region table into a flat file, open the table in QMF (select *), and run the command:-
Export data to <file name>
If the dataset does not exist it will create. No need to create prior to run this command.

4. SAVE:
To copy a temporary storage area to permanent storage.It saves the query, proc etc to permanent storage.
Save <QMF Object> –> saves it with its current name
QMF Object can be a Query, form, Proc, Data or profile.
Save <QMF Object> AS <Item Name>
Item Name is the name you choose for the saved area and is qualified with your user-id.

To display the saved area.
Display <name>
Name can be a Query, form, proc, profile or a saved name (of the query, proc, form, profile)

6. RUN:
To execute a query or procedure.
Run <name>
Name can be a query, procedure

To remove something from the database.
Erase <name>
Name can be a saved query, procedure or table.

8. LIST:
To display the list of database items.
List <Type>
Type can be queries, form, proc, table or ALL.
Ex: LIST QUERIES –> Displays all the Queires available
If the type is tables then all the tables and views you are authorized to view are displayed.
If type is ALL then all the tables, views forms and procs you are authorized to view are displayed.
Owner –> Userid/ALL. Default is User-id.
Name –> Item name/all. Default is ALL
UserId and Item Name can contain selection symbols “%” or “_”

To retrieve the previously entered command.
RETrieve (or) ?
This can be entered multiple times.
E.g.: ?? Means it displays the previous command (back 2)

10. RESET:
To clear QMF Panel and temporary storage areas.
RESet <area name>

Area name –> query name, proc, profile, form.

Add a Comment

Your email address will not be published. Required fields are marked *