Page 1 of 1
Explain how GA file lock logic.
Posted: Fri Jul 20, 2012 12:42 pm
I would like to understand GA lock logic. I do a sql select to count number of records on a file, and if we do not have records i just exit. But when we have records, I try and do a ALCOBJ on the file, and GA gives me a error saying file is already locked. ??
Re: Explain how GA file lock logic.
Posted: Tue Jul 24, 2012 1:57 pm
The select statement to count the number of records creates a rowset that opens the file, so that an ALCOBJ cannot get an exclusive lock on the file. In order to release the file, you would use the Close Rowset task in the Miscellaneous folder. You will want to do a Set Variable 1.0 task to get the number of rows out of the rowset and place it into a variable before you close the rowset.