|
The only problem with that I see is that if a future programmer tries to use the longer of the two fields (for example, use the shorter field as input to populate the longer field) then you could end up with data in the last 5 chars that is left over from a previous operation. Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 Tel: 709-576-8132 Email: rpower@xxxxxxxxxx Website: http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill "Michael Naughton" <michael_naughton@xxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/08/2004 11:13 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Same field names in different files I agree with the responses that say a different size means you need a different field name. My solution to this is to set up the shorter field as an overlaid field (or DS if you prefer) based on the field in the database. That way, it's automatically populated with the correct data. RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> writes: >I've experienced only one problem and that is if >there is a difference in sizes then the program gives a compilation error. > >Eg: The NAME is 30 chrs in the Customer file & you want to print/display >only the first 25 characters. If we use the same field names i.e NAME it >gives a compilation error. Mike Naughton Senior Programmer/Analyst Judd Wire, Inc. 124 Turnpike Road Turners Falls, MA 01376 413-863-4357 x444 mnaughton@xxxxxxxxxxxx -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. This OutBound email has been scanned for Viruses
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.