RPG/400 filename length

265 pts.
Tags:
Physical File
RPG
RPG/400
I have a physical file name with length of 10. I need to declare the same file in RPG/400 but here accepting only 8 length. Any way to overcome this?
ASKED: March 19, 2009  10:45 AM
UPDATED: August 22, 2013  6:07 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

You can use OVRDBF to override the file, this will allow you to call the file whatever you want in your RPG. You will need the OVRDBF in effect when you compile so your RPG can find the external definitions for your file. For example your file is called MYWORKFILE :-

OVRDBF FILE(ANYTHING) TOFILE(MYWORKFILE)

Then use ANYTHING as your file name in your RPG.

Alternatively, you could use ILE/RPG which will allow longer file names.

Regards,

Martin Gilbert.

/////////////////////////
that’s right the ovrdbf is
OVRDBF FILE(SHORTNAM) TOFILE(SHORTNAME)
if the compile is interactive
issue the override
issue the compile
or
create a CL that
issues the override
issues the compile
and run it in batch

The override is issued before the call whenever you use this program
After the call issue the command DLTOVR SHORTNAM

Phil

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Askt
    I need to create a new file ANYTHING with same strucure of MYWORKFILE.... but i am not suppose to create any new file..... Please advice..
    265 pointsBadges:
    report
  • RonKoontz
    YOU CAN STILL USE THE OVRDBF FILE. JUST COPY THE FILE TO QTEMP OR SOMETHING.
    1,780 pointsBadges:
    report
  • RonKoontz
    sorry just otveride it to itself. Like OVRDBF(test123456) To(test).
    1,780 pointsBadges:
    report
  • Gilly400
    Hi, You don't need to create a new file. The OVRDBF just points the RPG program to the correct file. You can use whatever name you want in your RPG, then use the OVRDBF to override the name in your RPG to "point" to your existing file. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • LBurkett99
    You a looking at a two-step process, both of which require and OVRDBF. To compile the program you need to precede the CRTRPGPGM command with an OVRDBF command which links the name of the file in the program to the files actual name. To execute the program you need the same OVRDBF command so the program can find the correct file. The example given by Gilly400 above will work in both cases. Remember the OVRDBF command must be in the same job as the CRTRPGPGM (to compile) and CALL (to execute) commands. Simple if both are interactive, some programming required if batch.
    830 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following