|
Alternate Names for Indicators
Hey, Ted:
We have a lot of old, large RPG programs that are chock full of indicators. We have converted them to RPG IV, and the mixture of code styles looks like the patchwork quilts I slept under at my grandmother's house when I was a kid. I would like to use indicator variables, but going back through a source member and replacing all references to an indicator is impractical. For one thing, an indicator might be changed within a display file and also within the program itself. Here's an easy way to gradually rename indicators in old, monolithic programs.
The technique I have started using is to assign an alternate name to an indicator. I create an indicator variable and base it on a pointer to the indicator I wish to rename. As I make modifications to the program, I use the alternate name wherever possible.
In the following program fragment, indicator 25 has the alternate name of NoMatch.
D NoMatch s n based(ptrNoMatch)
D ptrNoMatch s * inz(%addr(*in25))
--Mark
Thanks for sharing this technique with readers of Midrange Guru, Mark. I know what it's like to work on that old code. We need all the help we can get!
--Ted
Sponsored By
WORKSRIGHT SOFTWARE
|
|
Do you need area code information?
Do you need ZIP Code information?
Do you need ZIP+4 information?
Do you need city name information?
Do you need county information?
Do you need a nearest dealer locator system?
We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!
The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.
PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.
Just call us and we'll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.
WorksRight Software, Inc.
Phone: 601-856-8337
Fax: 601-856-9432
E-mail: software@worksright.com
Web site: www.worksright.com
|
|
Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris
Shannon O'Donnell
Managing Editor
Shannon Pastore
Publisher and
Advertising Director:
Jenny Thomas
Advertising Sales Representative
Kim Reed
Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com
|