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



Thanks Kim. I usually try to avoid global file DS within a service
program. However, if it is unsafe to overlay PF extname DS with logical
likerec DS, I might resolve into using global file DS.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Ken Sims
Sent: Tuesday, September 04, 2007 3:28 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Map physical file's EXTNAME data structure over
it'slogicalfile's likerec data structure

Hi -

On Tue, 4 Sep 2007 13:06:57 -0500, "Lim Hock-Chai"
<Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:

(Because most programmers here are likely to use extname of the
physical file as the third parameter, I need to make sure that the
likerec and extname produce exact same DS).

Your code only ensures that they occupy the same storage. It does not
in any way ensure that they have the same fields with the same
attributes and positions.

In this situation I would probably have just the PF data structure
defined with EXTNAME. Clear the data structure. Chain to the
appropriate logical file without specifying a data structure on the
chain.

Without data structures on the chains, the records will be processed
field by field. If there are any fields in the physical but not in the
logical, the data structure fields will keep the value set by the clear.
If there are any fields in the logical but not in the physical, the
values in those fields will not appear in the data structure.

Ken
http://www.kensims.net/
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.
--
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 ...

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.