Ok, this is probably a really dumb question, but I cannot find any examples of reading one file via SQL and adding those records to a physical file in QTEMP. I am using these statements within an RPGIV program.
The SQL statement I am using to read the file is:
SELECT nnam, nadd1, nadd2, ncity, nstat, nsid FROM NAME1P WHERE nnam LIKE '%JOHNSON%' ORDER BY nnam
I want the results from the above SQL statement to be written to a temporary file called SEARCHPF in QTEMP.
Any suggestions would be greatly appreciated.
The SQL statement I am using to read the file is:
SELECT nnam, nadd1, nadd2, ncity, nstat, nsid FROM NAME1P WHERE nnam LIKE '%JOHNSON%' ORDER BY nnam
I want the results from the above SQL statement to be written to a temporary file called SEARCHPF in QTEMP.
Any suggestions would be greatly appreciated.