I've done that Scott, that's sort of why I'm asking here :)

So far it won't compile when I attempt to read the value in any of the
fields, I get an RNF7030.

You can pass a file using LIKEFILE, you didn't say what error you get on
the compile. I have never used it, you might want to review the
relevant section in the RPG reference as to how it can be done.

Scott Mildenberger

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of RPGLIST
Sent: Monday, February 04, 2013 12:01 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Passing a file as a parameter to a second Program

I was under the impression that you could use a parm starting in V6R1
provided that you use the LIKEFILE keyword.

You pass an external described DS. thus you should also define an
external described DS in the called programme.

Regards,
Carel Teijgeler.

On 4-2-2013 19:32, RPGLIST wrote:
I am attempting to pass a file as a parm to a second pgm, but it will

not compile. Any suggestions or pointers would be greatly
appreciated.


Here is what I have so far:

Program A - The Caller

0001.00 FTrctCont if e k disk block(*no)
0005.00
0005.01 DMytest1 pr extpgm('MyTest1')
0005.02 D Parm1 LikeFile(TrctCont)
0005.03 D
0006.00 /Free
0006.01 Callp MYTEST1(TrctCont);
0006.02 *Inlr = *On;
0007.00 /End-Free

Program B - The Called Program

FTrctCont if e k disk template block(*No)
F Qualified
DMyTest1 pr ExtPgm('MYTEST1')
D parm1 LikeFile(TrctCont)

DMyTest1 pi
D Parm1 LikeFile(TrctCont)

DMyVal1 s 1n


/Free
If Parm1.emlrdt = 0;
MyVal1 = *On;
Endif;
*Inlr = *On;
/End-Free



--
This is the RPG programming on the IBM i (AS/400 and 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.




--
This is the RPG programming on the IBM i (AS/400 and 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.


--
This is the RPG programming on the IBM i (AS/400 and 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-Ups:
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.