Using the CA 2E naming convention has several advantages:
- Names are made up from a restricted vocabulary of components, making it relatively easy to learn and remember.
- Strict use is made of positional information, so that a name can be clearly broken down into its components.
- Both object type and attribute are encoded in object names. This helps you to identify objects simply from their names.
- On lists, objects are arranged by functional group. Anomalies can be spotted.
- Fields can be related to formats, and formats related to files.
- Field names are uniquely qualified by format, so inadvertent file updates do not take place. Declaring an external file for use in an RPG III program automatically declares all the fields in the file to be available in the program. If more than one file contains a field of the same name, this can lead to undesirable effects in a program that accesses both of those files. For example, if you chain to a reference file while binding a transaction file record, and if both files contain a field of the same name, the field on the transaction file could be unintentionally updated with the field from the reference file. (Where field mapping is desired, fields can always be explicitly renamed.)
- Easy copying and inclusion from existing source.
- Easy manipulation of groups of entities by OS/400 and CA 2E 400 Toolkit utility commands. Since many commands work on "generic" names, this is of considerable practical significance.
- You can create or analyze names with ease.
- You can include existing programs, source, and sections of source in new systems with greater ease.
- Programmers can understand unfamiliar code faster.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |