1. | AVG T1.SRCDTA |
2. | AVG T2. SRCDTA |
3. | AVG T3. SRCDTA |
1. | Type which database fields to download to the PC and which functions to use to create a summary of records in the SELECT field. If the SELECT field is left blank, all fields are downloaded from the host file. You can specify more than one field to download by separating
each field with a comma. Add one or more spaces to improve readability. When downloading a summary of records, the SELECT field uses the following format:
FUNCTION (FIELDNAME)
The FUNCTION can be any one of the following:
|
2. | The FROM field should contain the host files or libraries you specified in the File Transfer dialog box. If you want to add more files or libraries, you can only do so in the File Transfer dialog box. If more than one file appears in this box, the JOIN BY field will be activated. |
3. | Type one or more conditions that the record must meet for it to be downloaded in the WHERE field. If WHERE is blank, all the records in the specified file member(s) are downloaded. The FIELDNAME TEST VALUE condition specifies the
test to be applied to the records in the file member, and only those records that pass the test are downloaded.
The following table explains how to define these parameters.
|
4. | Type the commands that specify how to link or join the records of the specified files. The JOIN BY field becomes active when you specify more than one file in the FROM field. You must join each file identified as the sender with at least one other sender file. You can specify one or more conditions to indicate the similarities between the two files. This allows you to identify which
record of one file joins to the records of the other.
You must type the field names that join the files using the following formula: FieldName CONDITION FieldName
To join three or more files, or to join two files based on two or more common fields, you must use two or more link conditions.
To specify several join conditions, separate them with the AND statement. You can use this technique to specify up to 32 join conditions.
|
5. | Type the sequence in which records are to be sorted in the ORDER BY field. You can sort records by the fields in ascending or descending order. The default sorting order is ascending.
|
6. | Click the Group Options button to use the GROUP BY and HAVING fields. If you don't want to use the Group fields, click the Clear Group Options field. |
7. | Type the commands separate records from one or more AS/400 files and group them into two or more groups in the GROUP BY field. Select one or more fields specified in the SELECT field to group the host records. SQL groups the records in the order you entered the fields in the GROUP BY field. You can specify up to 50 fieldnames as long as they are separated with commas. You also can enter blanks to improve readability. |
8. | Type the commands that allow you to pinpoint the download transfer request that summarizes groups of records in the HAVING field. While you can use the WHERE field to review all records in a group, typing TEST and VALUE in the HAVING field allows you to use only the records that contain summary information about each group. A condition stated in this field
appears in this format:
|
9. | Type your download method in the SELECT field. There are four methods available:
When the fields from more than one file in the GROUP BY option are the same as in the SELECT option, your target file will be a summary of record groups.
The following table lists which options are available and/or necessary for each transfer method.
|