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



I need to create an export procedure that returns the record format of a
record in a file when chain is successful. This procedure will accept
two search arguments from caller and depending on value of first
argument, this procedure will access of the two logical files.


So the export procedure would look something like below:

P myProc B
D pi n
D piArg1 3s 0 const
D piArg2 7s 0 const
D poRecFmt likeds(MYPFFmt)

D myLF1DS ds likerec(MYLF1Fmt)
based(myRecFmt_p)
D myLF2DS ds likerec(MYLF2Fmt)
based(myRecFmt_p)

myRecFmt_p = %addr(poRecFmt);

If Arg1 = 'X';
chain (arg2) MyLF1 myLF1DS;
Else;
chain (arg2) MyLF2 myLF2DS;
Endif;

Return %found;



(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).



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rory Hewitt
Sent: Tuesday, September 04, 2007 12:20 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Map physical file's EXTNAME data structure over it's
logicalfile's likerec data structure

Lim,

It should be safe (assuming the logical uses the same record format),
but why would you want to do this?

Rory


On 9/4/07, Lim Hock-Chai <Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:

Is it safe to overlay a physical file's EXTNAME data structure over
it's logical file's likerec data structure in an RPG program?
Assuming that the logical does not re-define/sub-select fields.

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