Professional Documents
Culture Documents
How To Create A Table and Enter Records
How To Create A Table and Enter Records
How To Create A Table and Enter Records
4. You can create PS files for both input and output data sets and use them if you want.
(make sure that your output data set is sequential data set).
5. Press enter
8. You can see Edit session has completed. Now you can press enter to continue.
9. You can check the output file with statement execution was successful with sqlcode is 0.
Which means the table has been successfully created). You can also check the log message below.
12. Comment the above create query and type select * from emp
13. Press F3 to back into SPUFI and press enter
We can see the table has been created by two variables (empname and empid).
Below in the log history we can see the no. of rows displayed is 0 as there are no record entries given till
now.
We can see that employee data has been added to the table successfully with sqlcode 0.
19. Now if you want to enter more record, repeat the above steps by insert statement.
Now we can see the no. of rows affecter are 1. If you want to check the table, use select query and see the
table entries.
Second record added successfully. Similarly you can add as many record as we need.
21. If you want to enter more than one record use multiple insert statements with different empname and
empid and follow the same steps as done above.