Useful QMF Commands
Useful QMF Commands
Below are commonly used QMF commands for quick reference
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.
Ex: IMPORT DATA FROM REPORT1
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.
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.
Name can be a Query, form, proc, profile or a saved name (of the query, proc, form, profile)
To execute a query or procedure.
Name can be a query, procedure
To remove something from the database.
Name can be a saved query, procedure or table.
To display the list of database items.
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)
To clear QMF Panel and temporary storage areas.
RESet <area name>
Area name –> query name, proc, profile, form.