Yes, you can
1. Use SQL to create an ALIAS file
CREATE ALIAS QTEMP/&yourFile FOR &yourLib/&yourFile (&yourMember)
2. Use your SQL statement ot update the file QTEMP/&yourFile
3. Delete QTEMP/&yourFile
NOTE: you do not need to use QTEMP. I just do the so I do not leave unneeded objects on the system since for me these are one time shots.
If you are doing many SQL statements over the same members, you may want to leave themn on the system.
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Absolutely right but confusing, Charllie used &yourFile for both the file name and the Alias name.
1. Use SQL to create an ALIAS file
CREATE ALIAS QTEMP/yourAlias FOR yourLib/yourFile (yourMember)
2. Use SQL to
Delete QTEMP/yourALIAS where ...... rules for finding records to be deleted.
3. If you want to delete alias Use SQL
Drop Alias QTEMP/yourAlias
----------
By creating the Alais in QTEMP it goes away when your job ends. If you want the alias to be persistant then create it in a real library.
Phil
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
To see other answers submitted to the Answer Wiki
View Answer History.