OPNQRY

25 pts.
Tags:
AS/400 error messages
AS/400 Query
Open Query
OPNQRYF
Run Query
RUNQRY
Hi ALL, I am trying to pass to variable to the query select. ----------------------------------------------------------------------------------------------- OVRDBF FILE(filename) SHARE(*YES) OPNQRYF FILE((library/filename) QRYSLT('DATE + *EQ "&SATDYYMD"') /*the variable contains the date*/ CPYFRMQRYF FROMOPNID(filename) TOFILE(library/outputfile) + MBROPT(*REPLACE) CRTFILE(*NO) RUNQRY QRY(library/queryname) + QRYFILE((Library/filename) (library/outputfile) CLOF OPNID(filename) DLTOVR FILE(filename) ----------------------------------------------------------------------------------------- error message:Cause . . . . . : Control language (CL) program RCDSLCT11 in library TEST1 detected an error at statement number 2300. Message text for QRY2276 is: RUNQRY has too many files specified for query XXXXX in TEST1. Can anyone help me out.

Answer Wiki

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

Hi,

You have 2 files specified for your RUNQRY statement. I suspect that your existing *QRYDFN is only designed to use 1 file.

Regards,

Martin Gilbert.

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
  • Secskc
    Hi, Thank for the reply..below is the code what I have wriiten for clear understanding..Please help me out --------------------------------------------------------------------------------- OVRDBF FILE(ABC13DEF) SHARE(*YES) OPNQRYF FILE((TEST1/ABC13DEF)) QRYSLT('DATE + *EQ "&SATDYYMD"') CPYFRMQRYF FROMOPNID(ABC13DEF) TOFILE(TEST1/ABCD13) + MBROPT(*REPLACE) CRTFILE(*NO) RUNQRY QRY(TEST1/CRADPAYDAT) + QRYFILE(TEST1/ABC13DEF) (TEST1/ABCDC13) CLOF OPNID(ABC13DEF) DLTOVR FILE(ABC13DEF) ---------------------------------------------------------------------------------
    25 pointsBadges:
    report
  • Gilly400
    Hi, I think you only need to use (TEST1/ABCDC13) for your RUNQRY - this file should only contain the data you select using OPNQRYF :- OVRDBF FILE(ABC13DEF) SHARE(*YES) OPNQRYF FILE((TEST1/ABC13DEF)) QRYSLT(’DATE *EQ “&SATDYYMD”‘) CPYFRMQRYF FROMOPNID(ABC13DEF) TOFILE(TEST1/ABCD13) + MBROPT(*REPLACE) CRTFILE(*NO) CLOF OPNID(ABC13DEF) DLTOVR FILE(ABC13DEF) RUNQRY QRY(TEST1/CRADPAYDAT) QRYFILE(TEST1/ABCDC13) Regards, Martin Gilbert.
    23,730 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