× 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: Another V5R1 query... Qualified DSs
  • From: bmorris@xxxxxxxxxx
  • Date: Thu, 10 May 2001 13:46:44 -0400
  • Importance: Normal


Date: Thu, 10 May 2001 07:27:39 -0500
From: "Stone, Brad V (TC)" <bvstone@taylorcorp.com>
>>
>> D someDS         DS        PREFIX('DS2.')
>> D   sub1               1a
>>
>> With true qualification, the subfield should be someDS.sub1,
>> but with the prefix kludge, the subfield would be DS2.sub1.
>> Sure, the compiler could give an error if they didn't match,
>> but ... ewwwww.
>
>ewwww?  Well, either I mistyped my example or it's been changed.

Brad, I changed it to show why it's better to use a keyword.  By
the way, 'someDS.' wouldn't work.  Literals are case sensitive, and
the ds name is SOMEDS no matter how you type it.

As I see it, there are 3 major benefits to this new feature.  The
first is related strictly to QUALIFIED; most of the good stuff
comes from LIKEDS.
1. Using QUALIFIED, you can code "type definition" data structures
   in /COPY files without having to worry about subfield name
   collision.
2. LIKEDS allows you to use data structure parameters in
   prototyped procedures.
3. LIKEDS allows you to write your DS once and use the layout
   for as many variables as you want.  (Formerly available only
   with externally-described DS and PREFIX, and anyway, LIKEDS
   is better than PREFIX because it's impossible to have name
   collisions.)

Regarding your wish to have all xxx subfields updated with a
single assignment to xxx, I guess that might be cool, but I
doubt it would have a very broad application.  For sure such
a feature wouldn't be discussed using the term "qualified names".
We didn't invent this term for RPG - many languages have qualified
names, and it always means the same thing.

How about %allfieldsnamed(xxx) = value.  (don't hold your breath :)

Barbara Morris


+---
| 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 ...

Follow-Ups:

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.