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



Subfields of data structures, if they are numeric, will be zoned unless you
explicitly define them as packed in the DS.

Does the prototype have Const or Value keywords on the fields in question?

Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx 



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Rick.Chevalier@xxxxxxxxxxxxxxx
Sent: Monday, March 13, 2006 10:17 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Field interpreted differentlybetweenphysicalandlogical


Barbara,

The problem comes in when I define fields in the /COPY prototypes using the
data structures in the /COPY member.  In the RPG program I call the
procedure using the fields from the data files as parameters.  The program
blows up because the field I am passing as a parameter doesn't match the
definition on the prototype.  To make it work I have to move the contents of
the files fields into the /COPY fields before the call.
If not for that, I wouldn't place data into the /COPY data structure fields.

Rick

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris
> Sent: Friday, March 10, 2006 8:12 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: Re: Field interpreted differentlybetweenphysicalandlogical
>
> Rick.Chevalier@xxxxxxxxxxxxxxx wrote on the Websphere Development 
> Studio Client for iSeries  (WDSCI-L) mailing list:
> >
> > So, it's the QUALIFIED keyword that is causing the problem.  The 
> > purpose of using QUALIFIED was to generate unique names that didn't 
> > conflict with the fields in the file and at the same time
> identify the
> > origination of the field.  It sounds like using PREFIX
> would have been
> > a better choice.  Would the use of PREFIX create the same
> situation I
> > have now?
> >
>
> (This was formerly a thread on the WDSCI-L mailing list.) Here's a 
> link to the thread index for anyone who wants to catch up on it:
> http://archive.midrange.com/wdsci-l/200603/threads.html#00012
> (the logical thread shows up as several individual little threads.)
>
> Rick, using PREFIX would have caused the same situation.  In that 
> case, your file would have been using the unprefixed names, while the 
> data structure defined prefixed names.
>
> The purpose of the data structure in the /copy file is to define other 
> fields and parameters used in the /copy file.  I don't think it 
> shouldn't have a secondary purpose of being available for program 
> data.
>
> I think the correct fix is to define the externally-described data 
> structure that your program needs in the source for your program, and 
> not to care that it is also defined in the /copy file.  If you're 
> worried about the extra physical storage allocated for the data 
> structure in the /copy file, you could define it as BASED (and then 
> don't set the basing pointer to point to anything).
>
> I think your original purpose was good; generating unique names that 
> didn't conflict with the fields of the file.  Now you're trying to 
> both have and not have the fields in the data structure the same as 
> the fields in the file; if you change the /copy file to be unqualified 
> and unprefixed for this one program, you will have a problem later if 
> you copy it into a program where you _don't_ want the same names.  And 
> there, the fix will be much harder than the fix for this program of 
> adding its own definition of the ext data structure.
>
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing 
> list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, 
> unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a 
> moment to review the archives at http://archive.midrange.com/rpg400-l.
>
>
>

Privileged and Confidential.  This e-mail, and any attachments there to, is
intended only for use by the addressee(s) named herein and may contain
privileged or confidential information.  If you have received this e-mail in
error, please notify me immediately by a return e-mail and delete this
e-mail.  You are hereby notified that any dissemination, distribution or
copying of this e-mail and/or any attachments thereto, is strictly
prohibited.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.