× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: File field names
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Thu, 26 Oct 2000 13:34:19 -0700
  • Organization: Pacer International

In a true object oriented language, such as C++, I would tend to agree,
or any place you can do data structures.  With such you are required to
either specifically give the datastructure/object name or us a clause 
such as With <structure> Do...

#Pragma Packed
Struct Customer {
   Char Number[10];
   .
   .
   .
   } CustRecord;

Struct InvoiceHead {
   Char Number[10];
   .
   .
   .
   } InvHeadRecord;

InvHeadRecord.Number = CustRecord.Number;

You can not refer to just Number as the compiler won't let you, you 
must qualify it (unless using the With <structure> Do, but that's the
same thing kinda).

But, with other langauges (such as RPG) using Number by itself is no
problem, unless I remember to use Prefix.

I guess if your standards are to *always* use Prefix without exception,
it would work.  But for maintaining legacy code, it wouldn't work without
a total rewrite.

Regards,

Jim Langston

rob@dekko.com wrote:
> 
> I am sure that failure to use the prefix would be caught given adequate
> testing.
> 
> I've seen files that are prefixed in the DDS have the same field names.
> Think about it.  Of the dozens of files in an ERP system which may use
> ITEM#.  There is a good chance it could happen.  You need to have
> standards.  And that standard should include the use of the PREFIX keyword
> where appropriate.
> 
> I've also seen fields added to a file that no longer use the same prefix.
> For example:
> BPCS-BBL file
> BLCUST
> BLSHIP
> BLDOCR
> LUDTE1
> LUDTE2
> BLCUSB
> Again, canned software from a different vendor.
> 
> And I am sure that your opinion that large prefixes, like qualified names,
> making programs unreadable may be held in disagreement from many quarters.
> Some people forget that BL means the BBL or Billing release line items
> file.  But that problem would happen if you used PREFIX or your method of
> manual prefixing.
> 
> But if you choose not to prefix, then you have the capability to move data
> from one file to another without z-adds, moves or evals.  Mostly useful for
> migrations.
> 
> Rob Berendt
> 
> ==================
> Remember the Cole!
+---
| 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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.