Tuesday, March 1, 2011

Useful QMF Commands

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.

This is to import the data from a PS to a table
Import from
Object Type may be DATA,QUERY,TABLE,FORM and PROC
DSName is the TSO data set name.
This is to export the data to a PS from a table.
Export to
To export test region table into a flat file, open the table in QMF (select *), and run the command:-
Export data to
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 as
Area Nameà Query, form, Proc, Data or profile.
Item Nameà Is the name you choose for the saved area and is qualified with your user-id.
To display the saved area.
Nameà Query, form, proc, profile, saved name (of the query, proc, form, profile)
To execute a query or procedure.
Nameàquery, procedure
To remove something from the database.
Nameàsaved query, procedure or table.
To display the list of database items.
List (owner= name=)
Typeàqueries, form, proc, table or ALL.
 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.
Area nameà query name, proc, profile, form.

No comments: