|
The only way that I know how to do this is by overriding the name with OVRDBF. From a CL program you might do something like this: OVRDBF FILE(SHORTNAM) TOFILE(LONGNAME01) CALL PGM(MYRPGIII) DLTOVR FILE(SHORTNAM) Or from the RPG program itself, you could try something like this FSHORTNAMIF E DISK UC I 'OVRDBF FILE(SHORTNAM-C OVRDBF I ') TOFILE(LONGNAME01)' I 'DLTOVR FILE(SHORTNAM-C DLTOVR I ')' C* C MOVELOVRDBF CMD P C Z-ADD80 LEN C CALL 'QCMDEXC' C PARM CMD 80 C PARM LEN 155 C* C OPEN SHORTNAM C* C* ... DO PROCESSING HERE C* C CLOSESHORTNAM C MOVELDLTOVR CMD P C Z-ADD80 LEN C CALL 'QCMDEXC' C PARM CMD 80 C PARM LEN 155 The REAL solution to your problem, however, is to upgrade to RPG IV. full 10-character filenames are fully supported. (RPG III isn't much better than RPG II... why do so many people still use it?!) On Mon, 5 Mar 2001 Refaie.Heba@khb.hu wrote: > I want to open a file in an RPG program but the file name is longer than 8 > characters and I am using RPGIII, I think that I can rename the file insde > the program but I can not recall now how to do this...Can anybody help. > > Thanks. > Heba +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.