695 pts.
 where does the file get created in AS/400 system when we fire embedded INSERT query in an RPGLE program
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.

Software/Hardware used:
ASKED: November 12, 2008  2:14 PM
UPDATED: November 12, 2008  2:22 PM

Answer Wiki:
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.
Last Wiki Answer Submitted:  November 12, 2008  2:22 pm  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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _