Tuesday, March 1, 2011

Useful QMF Commands


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.

Import:
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.
Export:
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.
SAVE:
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.
DISPLAY:
To display the saved area.
Display
Nameà Query, form, proc, profile, saved name (of the query, proc, form, profile)
RUN:
To execute a query or procedure.
Run
Nameàquery, procedure
ERASE:
To remove something from the database.
Erase
Nameàsaved query, procedure or table.
LIST:
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 “_”
RETRIEVE:
To retrieve the previously entered command.
RETrieve (or) ?
This can be entered multiple times.
E.g.:  ??  Means it displays the previous command (back 2)
RESET:
To clear QMF Panel and temporary storage areas.
RESet 
Area nameà query name, proc, profile, form.

No comments: