1,150 pts.
 file names in rpg/400
How to alias a file name in rpg/400 program. the problem here is the file name 10 char length and RPG/400 allows a maximum of 8 chars. Please answer...thanks

Software/Hardware used:
ASKED: April 27, 2009  9:56 AM
UPDATED: April 27, 2009  1:02 PM

Answer Wiki:
Hi, This is unfortunately one of the limitations of RPG/400. In ILE/RPG the limitation has been removed. To get around this in RPG/400 you'll need to use OVRDBF. For example, your file is called FILENAME10, then you could do the following :- OVRDBF FILE(FILENM10) TOFILE(FILENAME10) Then in your RPG you would use FILENM10 for your file name instead of FILENAME10 :- FFILENM10 UF , etc.... You will need to have the OVRDBF in effect at compile time and run time. Normally this will mean running the OVRDBF interactively and compiling interactively to compile your program. Then you would use a small CL program to run the OVRDBF before calling your RPG program. You can use DLTOVR to remove your OVRDBF. So, just to summarize :- <b>To compile</b> OVRDBF Compile RPG program. DLTOVR <b>To run</b> OVRDBF Call RPG program DLTOVR Another thing to bear in mind is the maximum of 8 characters for record format name, but then you can use RENAME in your RPG. Hope this helps. Regards, Martin Gilbert.
Last Wiki Answer Submitted:  April 27, 2009  10:23 am  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _