- An AFD cannot be deleted if it is in use by Data Rules, Data Extract, Comp Cases or Date Warping.
- There can only be one AFD for a File in a specified Library. There can also be a generic AFD specified for *LIBL (Library List).
- Fields defined by AFD are in addition to fields which already make up the IBM i OS/400 file description. For example, even an internally described file appears to IBM i with at least one field consisting of the whole data portion of the record. If the file is keyed, this will also have a separate field.
- The names assigned to new fields must be unique within the file and must be different from those in the IBM i file description.
- If an AFD is being defined for use in Remote Data Extraction, there must be a copy of the file on the local system at definition time with the same layout as the Remote version.
Rules for Concatenation of Fields
- Multiple fields can be concatenated into a new field.
- Concatenation fields can be constructed from existing fields and/or sub-string fields.
- Fields containing decimal places cannot be concatenated into a new field.
- A mixture of character and packed fields cannot be concatenated in a single new field.
- When a packed field is used as the source of a substring field, another packed field is created.
Also, a packed field is created if an alpha field type is overridden to a packed. These packed fields cannot then be used in a separate concatenation operation.
Rules for Substring Fields
- Field type override (O/r) is only valid for new fields based on alpha source fields, and must be packed (P) or zoned (S). The Field on the file must contain valid data appropriate to the field type of the new substring field.
- Decimal places are only valid for alpha source fields being overridden to numeric fields.
Alternative File Descriptions can be accessed from the TestBench main menu.
2 – Change Access the AFD Details from where existing AFD fields can be modified and new ones created.
3 – Copy Create a duplicate of an existing AFD.
4 – Delete This option will delete all information associated with the AFD. A warning is displayed before the delete process begins.
5 – View Display all of the details associated with the AFD.
8 – Audit Data Every addition, update and deletion to an AFD is tracked and can be viewed here.
10 – Where Used List all components which use this AFD. These could include Data Rules, Data Cases, Comp Cases and Warp Cases. These links must be removed before the AFD can be deleted.
F6 – Add Create a new Alternative File Description. The following screen is displayed.
File The name of the physical file to be described. The entry is required and the file must exist on the iSeries in the designated library.
Library The library name in which the file is to be found. This can be a named library or the keyword *LIBL can be used to search the Library List. If *LIBL is used, the library containing the file must be in the current library list. When an AFD is used in other parts of TestBench, such as Warp Cases, Data Cases or Compare Cases, and the use of AFD is turned on for a given file, TestBench will first attempt to find a file in the same library as being referenced by the Warp, Data or Compare Case and if one is not found, will then attempt to find one with the library as *LIBL. Hence, *LIBL can be used as a generic AFD definition for a file.
Description This must be entered, but will default from the object description for the first occurrence of a file on pressing Enter.
Press Enter on this screen to display concatenation and sub-string entry screens.