To place the copy in the same library as the original, do not type anything in the To library prompt.

Then select a choice in the Replace query prompt:

vType a Y if you want the copy to replace a query that has the same name in the library.

vLeave the N in the prompt if you want to copy the query to the library only if no other query with the same name already exists in the library.

To rename the query(s), type the new name(s) in the To Query column. If you place the copy in the same library as the original query, you must type a new name for the copy. If you place the copy in a different library, you can rename it, or you can use the original query name.

When you are finished typing information on the Copy Queries display, press the Enter key. If Query finds no errors while copying the queries, all the queries are copied. If you did not select any other options from the Work with Queries display (such as change, delete, display, and so on), you return to the Work with Queries display. If you selected the queries to be copied from a list of queries in a specific library and did not copy the queries to a different library, the names of both the original and copied queries are included in the list.

If Query finds an error while copying the queries, the list of queries being copied is shown and an error message appears at the bottom of the display. The query that has the error is highlighted and appears at the top of the list. Any queries that were before that query in the list have already been copied. You can do either of the following:

vPress F9 (Reset) without pressing the Enter key. The copy process is canceled for all remaining queries, including the query in error.

vPress F20 (Cancel copy in error) without pressing the Enter key. The query in error is not copied. To continue copying the remaining queries, press the Enter key. If an error is found while copying one of the remaining queries, another error message is shown and the list is shown again with that query listed first and highlighted.

Renaming a Query for iSeries query definition

If you want to rename a query, do the following:

1.Copy the query, giving the copied query a new name.

2.Delete the original query.

These tasks are options on the Work with Queries Display and are described in other sections of this chapter.

Deleting a Query for iSeries query definition

When you no longer need a query, you can delete (remove) it from the library. Once you delete a query, you cannot get it back, so it is a good idea to check a query definition before you delete it. If you delete a query from the Work with Queries display, you can use F11 to display text about the query. If there is no text, or if it does not include enough information to help you, you can display or print the query definition. These tasks are described later in this chapter.

You can delete a previously saved query by:

vUsing the Delete Query (DLTQRY) command. For more information on using the DLTQRY command, see the CL Reference information in the iSeries Information Center.

vSelecting option 3 (Delete a query) on the Query menu. This causes the DLTQRY (Delete Query) command help display to appear. For more information on using the DLTQRY command, see the CL Reference information in the iSeries Information Center.

vUsing option 4 (Delete) on the Work with Queries display. You can type the name of the query (and its library) on the display, or you can, from a list of queries, type a 4 next to the query(s) that you want to

178Query for iSeries Use V5R2

Page 190
Image 190
IBM SC41-5210-04 manual Renaming a Query for iSeries query definition, Deleting a Query for iSeries query definition