@econ wrote:
no, in the example i posted in the second data step, the table test.sas7bdat is intact in work. the table test.sas7bdat.lck is created to it's ultimate size. then the data step hangs for about a minute when renaming test.sas7bdat.lck to test.sas7bdat.
and as an example if i was to stop the data step before it finished test.sas7bdat.lck would be deleted and the original test.sas7bdat would remain.
What you are saying does NOT contradicts the comments from @ballardw. It is not the best practice to use the same table names for both input and output in the same data step, however, when you choose to do so, SAS will lock(.lck, readonly?) the original, just in case your process is adrupted unexpectedly. When your buidling process is complete, SAS will take some time to verify it (SAS skip this step when building a different name table), if SAS feels comfortable after verifying, that is when .lck is deleted, and whole process is finally over.
In the case your process is NOT a success, the target table failed completely or partially, SAS will delete the failed, and rename .lck back to original.
... View more