× 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: Move an entire record format as a whole
  • From: dhandy@xxxxxxxxxxx (Douglas Handy)
  • Date: Thu, 08 Jul 1999 19:40:02 GMT

Dear Lowly RPG III User,

>My question is, where is the Prefix keyword used, on the external 
>description, on an RPG spec., or what?

Alas and alak, the prefix keyword cannot be used in RPG III.

In RPG IV, the prefix keyword can be used in either of two places:
 - The F-spec, which causes all fields in the file to use the prefix
 - An external DS definition, which causes all subfields to have the
prefix.

The first case is useful, for example, when your program has two or
more files with identical formats, and you want the fields from each
file to have separate storage areas so you can compare or manipulate
them.  In a sense, it allows you to emulate having qualified field
names like nearly every other HLL in existance.

In the second case, using a prefix on multiple DS's with the same
external definition allows you to "save" a copy of the record and
still have complete access to all the subfields while concurrently
having access to the subfields in the other DS(s).  Depending on your
needs, this can be advantageous over using a multiple occurence DS
where you only have access to one occurence at a time.

But this is just a small example of what RPG IV can do instead of
RPG/400.  There are many other new features, many of which dwarf the
significance of Prefix (IMHO).  Although I am also glad we have
Prefix.

Doug
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  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.