Copy Row Selection


The Copy Row Selection screen appears by entering T in the Selection Criteria Usage field and in the Criteria Display Format field on the Table Copy Selection screen (see Table-Copy-Selection). You bypass the Copy Row Selection screen only when you enter N in the Selection Criteria Usage field. The Copy Row Selection screen lets you specify WHERE statements that are used to define specific rows to be copied.

When you complete your entries, type EXECUTE and press Enter or press the associated PF key to complete the copy. A message stating how many rows have been copied appears on the Table Copy Selection screen.

You can execute the SQL primary command on this screen to view or save the SQL File-AID for Db2 generated to complete the task.

Copy Row Selection screen

image2021-3-10_16-48-8.png

Table Name

Displays the Creator and name of the table or view to be copied.

Max Rows to Select

Specify the maximum number of rows to be copied. (An asterisk in this field indicates that all rows should be returned.)

Column Name

Column names in the from table.

Type(Length)

Column type and length.

Where

Type the WHERE clauses used to select the rows to be copied. The field can be scrolled left and right. You may use the following delimiters in your clauses:

>

OR

< >

<

> =

BETWEEN

=

< =

IN

¬ =

¬ >

LIKE

AND

¬ <

NOT

Executing or Saving Template, or Viewing/Editing SQL

From the Copy Row Selection screen, you can execute or save the template, or view/edit the SQL. You can also view an alternate display of the template.

Use EXEC to Continue

Type EXECUTE on the command line and press Enter, or press the associated PF key to process the request. The Table Copy Selection screen displays.

SQL to View/Edit SQL Source

Type SQL on the command line, and press Enter. File-AID for Db2 generates all SQL for the current function and places the SQL statements into a data set.

If you specify M-Modify or E-Existing Selection Criteria Usage, this data set must be an existing sequential or partitioned dataset with RECFM=FB and LRECL=80. The data set name is specified on the options panel in the Selection Criteria Dataset Name field. View/edit the data set, and then press END (PF3) to save any changes and exit the window.

If you specify T-Temporary Selection Criteria usage, a temporary data set containing the SQL source is created. An ISPF edit session is initiated, enabling you to view/edit the SQL. If you want to save the SQL source, you must use the ISPF CREATE or COPY command before exiting the edit session.

SAVE

Type SAVE at the command line, and press Enter. The Selection Criteria Dataset Specification window (see the following figure) displays. This allows you to save the current Template Selection Criteria to a data set.

Selection Criteria Dataset Specification for Copy

image2021-3-10_16-49-31.png

Dataset

Specify the name of the data set you want the selection criteria to be saved to. File-AID for Db2 prefills this field with the name of the last specified selection criteria dataset name.

Member

Specify the member of the data set you want to save the selection criteria to.

Press END if you do not want to save the current selection criteria to a data set.

SIZE

The SIZE command provides an alternate display of the Copy Row Selection screen which allows 58 positions of the WHERE clause to be displayed, and does not include all of the lines on the original display. The alternate display is designed to maximize the amount of rows displayed on the panel, so that you have a larger area to build a WHERE clause.

Type SIZE at the command line and press Enter. A panel is displayed (see the following figure) with only the Column name and WHERE columns displayed. Enter SIZE again to return to the original display of the Copy Row Selection screen.

Alternate Display of Copy Row Selection Screen

image2021-3-10_16-50-15.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*