Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RPGLE File declaration

I need to write a program that reads a file from library 1 and writes it to another file in another library. The problem is that both files have the same name and format. I've tried renaming the format, but the program still considers the two files to be identical and is unable to identify the second, which is in another library.

Have you any ideas pleause? thank you very much for your help

like image 739
aicha04 Avatar asked Aug 20 '26 00:08

aicha04


1 Answers

Assuming a supported version of the OS..

You need to use EXTNAME/EXTDESC

dcl-f myfile1 extdesc('LIB1/MYFILE') extfile(*EXTDESC) rename(MYFILEA:FORMAT1);
dcl-f myfile2 extdesc('LIB2/MYFILE') extfile(*EXTDESC) rename(MYFILEA:FORMAT2);
like image 67
Charles Avatar answered Aug 21 '26 14:08

Charles



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!