|
Richard, Here's a ds in which all the allowable values for the field Col_Fld_Type are listed right under it's definition, even though it is part of a larger data structure. Doesn't change anything except the readability or self-documentation of the ds. With proper indenting (which doesn't come across too well), it is very evident what the constants are used for: D ds_Sfl_Layout DS D Column_Array DIM(400) D Col_SQLDASeq 5I 0 OVERLAY(Column_Array:1) D Col_Disp_Seq 5I 0 OVERLAY(Column_Array:*NEXT) D Col_Incl_Flg N OVERLAY(Column_Array:*NEXT) D Col_Null_Flg N OVERLAY(Column_Array:*NEXT) D Col_Fld_Type 10A OVERLAY(Column_Array:*NEXT) D cstBinary C CONST('*BINARY') D cstChar C CONST('*CHAR') D cstDate C CONST('*DATE') D cstPacked C CONST('*PACKED') D cstTime C CONST('*TIME') D cstTimeStamp C CONST('*TIMESTAMP') D cstUnknown C CONST('*UNKNOWN') D cstVarChar C CONST('*VARCHAR') D cstZoned C CONST('*ZONED') D Col_EditCode 1A OVERLAY(Column_Array:*NEXT) D Col_Start_At 5I 0 OVERLAY(Column_Array:*NEXT) D Col_Width 5I 0 OVERLAY(Column_Array:*NEXT) D Col_Heading 25A OVERLAY(Column_Array:*NEXT) > -----Original Message----- > From: Barbara Morris [SMTP:bmorris@ca.ibm.com] > Sent: Friday, January 03, 2003 3:57 PM > To: rpg400-l@midrange.com > Subject: Re: Constant definitions (was: Visual RPG vs. Other Visual > .... > > Richard B Baird wrote: > > > > Barbara, > > > > is this an 'undocumented feature' or a bug? intended, or screwup. > > > > Dunno - maybe it's all of the above to some extent - I don't know the > history of it first hand. From the original compiler code, I can't tell > if it's accidental or deliberate, since the bug (if it is a bug) is > "missing code". But if it's a bug, it's an unfixable one since it could > be seen as a feature, and since fixing it would cause programs not to > recompile. > > > i'd like an example of where this would be beneficial, not just > confusing. > > > > I'm of two minds about it, but see this earlier post from Nelson Smith: > "From a documentation standpoint, I kinda like being able to define > allowed > constants immediately after (and indented under) a code field, for > example, > as long as it doesn't cause any other problems." > > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. ************************************************************************************************************************************************************************************************************ This message originates from Lincare Holdings Inc. It contains information which may be confidential or privileged and is intended only for the individual or entity named above. It is prohibited for anyone else to disclose, copy, distribute or use the contents of this message. All personal messages express views solely of the sender, which are not to be attributed to Lincare Holdings Inc., and may not be copied or distributed without this disclaimer. If you received this message in error, please notify us immediately at MailAdmin@lincare.com or (800) 284-2006. ************************************************************************************************************************************************************************************************************
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.