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



Hi Barbara, Hans,

Thanks for correcting me! I knew that. I don't know what I was thinking when
I sent that. Must be the heat -- gotta keep that a/c off so we have
electricity for the computers...

Regards,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax

----- Original Message -----
From: <bmorris@ca.ibm.com>
To: <rpg400-l@midrange.com>
Sent: Friday, August 24, 2001 10:05 AM
Subject: Re: Externally-Described Field used as array name.


>
> >From: "Peter Dow" <pcdow@yahoo.com>
> >Date: Thu, 23 Aug 2001 15:30:17 -0700
> >
> >The compiler sees PDLB02 in the data structure first, and allocates
memory
> >for it there.
> >
> >Then it sees PDLB02 in the input specs and wants to allocate memory for
it
> >within the input buffer, but it can't have a unique field name pointing
to
> >two different memory locations.
>
> Peter, the compiler doesn't allocate memory for input fields in the
> input buffer.  The input specs actually describe "move" operations
> from the input buffer to program fields.  The compiler uses the
> input spec information to generate definitions for you, if you don't
> already have explicit definitions.  (The memory for the input buffer
> is already allocated by database.)
>
> So it's perfectly normal and reasonable to have a D-spec definition
> for a field that appears in an input spec.  Just like it's normal and
> reasonable to have the same field in two different input specs, for
> two different files.
>
> Example:
>
> D FLD1        S        5P 0
> I              S   11   15 0  FLD1
>
> FLD1 is zoned(5,0) in the input spec.
> FLD1 is packed(5,0) on the D spec.
> The input spec says "move the zoned field in positions
> 11-15 of the input buffer to FLD1, whereever FLD1 happens
> to be".  This is one of the central features of RPG that
> makes it different from other languages.
>
> (You're not alone in thinking that I-specs are definitions.  It's
> one of the most common misconceptions about RPG.  The more common
> symptom of this misconception is thinking that if a field is zoned
> in the database, it must also be zoned in RPG.)
>
> Barbara Morris
>
> _______________________________________________
> 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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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.