The answer to this question involves whether you are running SAS on a server with multiple users updating the file; whether you are using SAS/IntrNet; whether you are using EG as one of the client applications as part of the SAS Enterprise Intelligence Platform.
However, your ability to achieve row level locking may be implemented differently if you are using SAS/IntrNet or the Enterprise Intelligence Platform. You might wish to contact your SAS Administrator or Tech Support for more help with your specific configuration and implementation questions.
I you have SAS/Share installed then this could be a way to go (also even with SAS/Share it's sometimes a bit tricky) - look at statements like "modify", avoid "proc sql" as it doesn't always behave like one would expect.
Also, after reading some of your other posts, it seems that you are also using SAS DI Studio and possibly other client applications in the SAS Enterprise Intelligence Platform. To implement row-level locking in the Platform context, you may want to read the Platform Administration documentation and work with your SAS Administrator and/or Tech Support on this question.
Just like to add that row level locking is also available within the SAS/SPD Server product. Another solution is to store you data in an external DBMS which will be accessed through a SAS/ACCESS connection.