|
Greetings to all, I hope I can explain our question without to much confusion. The main idenitying element in our system is a parcel id field defined as 14 alpha. A couple years back, this field was defined as 11, but needed to be expanded. Obviously, this was a large project. Most of our programs are written in PL/I, and we are in the process of converting everything to RPG. If this field should ever need to change again (which it may need to be in the near future), we want to 'protect' ourselves against the 'large project' scene. Now, our problem. As part of the conversion, we want to use the LIKE keyword as much as possible. Typically, there is a screen field or a database field that can be referenced. But, what about the times when neither of those is available. For instance, this parcel id field is formatted with dashes. The user doesn't enter the dashes on a screen, but the field is stored in the file with the dashes in it. We have a little format program (PL/I) that has been rewritten to a procedure in a service program. Also, we are trying to use prototyped calls. Our goal is to define the prototype in a /copy that would be in both the calling and the called program. To do this, and use the LIKE keyword, the field used in the LIKE statement must be in both programs. One option that we came up with, was to create a file that only contains the parcel id field, define the file in the I specs with UsrOpn. Then, in the INIT routine, put a statement ' IF *INLR = *ON', open the file (the open would never be executed). With this code, if another field was added to this file, the program wouldn't need to be recompiled. This won't work in the service program, because 'Open' isn't valid when 'NoMain' is specified. What are my options? TIA! Jade Richtsmeier Programmer/Analyst MN Counties Information Systems Grand Rapids, MN +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.