Field Selection -- Example 1
Suppose there is a file on your host computer that contains information about the employees in your company. Each record in the file contains a variety of information about one employee, such as the employee's name, address, phone number, rate of pay, and length of service.
In this example, you will transfer only the names and phone numbers of each employee to a file on the PC. You also want the PC file to list the employees in alphabetical order, from A to Z. Table below illustrates how the data will appear once it has been transferred to the PC.
Table
Employee name | Phone number |
Anderson | |
Brandybuck | |
Dilbert | |
Haram | |
Martinez | |
Simpson | |
Spock | |
Stiles | |
Wally |
To transfer only the employee name and phone number fields in the order shown above, follow these steps:
1.Enter the file transfer and translation information as you would with any file transfer.
2.Enter a plus sign () next to the FLDSEL parameter and press ENTER. This displays multiple prompts.
3.In the first prompt, for field name, enter EMPNAM(employee name). For the key field, enter *KEY1. This tells ETU that the employee name field is a key field with the highest sort priority (and the only sort priority, in this example). For ascending or descending, enter *ASC. This tells ETU to sort the records from A to Z. (If you entered *DES, the records would be sorted in order from Z to A.)
4.In the second prompt, for field name, enter PHONE (phone number). For the key field, use the default, *NONE, because the file will not be sorted using the PHONE field. The Ascending or
5.Descending field is not used because the Key Field value is *NONE.
When you execute this command, the file will transfer to the PC. The only fields that transfer are the employee name and phone number. The information will be sorted into alphabetical order.
ETU400 User Guide 011603 |