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
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With