A good way to make your programs more readable and more easy to maintain is to use the simple technique of renaming display file response indicators. Response indicators are those that are assigned to keywords (e.g., ROLLUP, ROLLDOWN, CFxx, CAxx). By using an RPG "I" specification with the applicable display file record format name, you can rename any *IN response indicator to a descriptive name such as ROLLUP, EXIT, or PROMPT (see 1). Not only will your programs be more readable, but by looking at your "I" specifications, you can instantly cross reference all of your command keys. Unfortunately, option indicators (the indicators that condition display file fields) cannot be renamed.
A good way to make your programs more readable and more easy to maintain is to use the simple technique of renaming display file response indicators. Response indicators are those that are assigned to keywords (e.g., ROLLUP, ROLLDOWN, CFxx, CAxx). By using an RPG "I" specification with the applicable display file record format name, you can rename any *IN response indicator to a descriptive name such as ROLLUP, EXIT, or PROMPT (see Figure 1). Not only will your programs be more readable, but by looking at your "I" specifications, you can instantly cross reference all of your command keys. Unfortunately, option indicators (the indicators that condition display file fields) cannot be renamed.
John Rittenhouse Jacksonville, Oregon
TechTalk: Add Meaning to Your Display File Indica
Figure 1 Renaming display file response indicators
Figure 1: Example of Renaming Display File Response Indicators 6..10....+...20....+...30....+...40....+...50....+...60....+ IDSPFL01 I *IN03 EXIT I *IN05 PROMPT I *IN61 ROLLUP
LATEST COMMENTS
MC Press Online