where does the file get created in AS/400 system when we fire embedded INSERT query in an RPGLE program

695 pts.
Tags:
AS/400
INSERT statement
RPGLE
RPGLE Program
SQLRPGLE
we are inserting deptid in departments table using the following INSERT statement: INSERT INTO departments (department_id, department_name ) VALUES (30, ':Purchasing'); so where does the departments file get created in As/400 system? when we are doing a runqry on departments file, it is giving the error that the file is not present in the library list.
ASKED: November 12, 2008  2:14 PM
UPDATED: November 12, 2008  2:22 PM

Answer Wiki

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

Hi,

INSERT doesn’t create the file – it only adds records to an existing file. Try running your RPG program in debug and then check the joblog – it probably has errors trying to insert the records.

You will need to create your file before running your RPG or use the CREATE TABLE statement to create your file.

Regards,

Martin Gilbert.

Discuss This Question:  

 
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

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