OVRDBF in JAVA

pts.
Tags:
Application development
AS/400
CLP
DataCenter
DB2 Universal Database
Printing
RPG
RPGLE
Security
Web development
I am trying to insert records to a member in a PF through JDBC. Tried with QCMDEXC in Java. But the member is not being overridden, inserting records in the First Member-always. What may bethe cause? Can any one suggest the possible solution for this?

Answer Wiki

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

Execute command OVRDBF MYFILE OTHERMBR where OTHERMBR is the one you wish to insert records into. Do this before doing anything with SQL.

==========================================================

An ALIAS might be a good idea, but be aware that it creates a permanent (SQL) object. An OVRDBF might be needed, especially if the member name is variable. If creating SQL objects is not allowed, then OVRDBF is required.

For the original question, exactly how was QCMDEXC invoked? It would need to be invoked as a stored proc if it was going to work at all. And what does the OVRDBF look like? Some parms might need changing.

Tom

Discuss This Question: 2  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
  • Jay400
    Correction: OVRDBF MYFILE MBR(OTHERMBR)
    0 pointsBadges:
    report
  • Pcatlin
    I'm not confident that doing an override will work in a JDBC connection... Depending on how you connect to the system you may use one or more QZDASOINIT jobs, and if the override happens in 1 and the SQL executes in another, the override won't work... You may need to create an alias for the member using syntax such as: CREATE ALIAS library/aliasname FOR library/file (member) then use the alias in your jdbc statement...
    200 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