@slthiya4
You can create data sets in any folder you like. It doesn't have to be WORK.
WORK is just a SAS libref created automatically by SAS and pointing to a folder location also created automatically by SAS during SAS invocation. When terminating a session SAS will automatically delete this WORK folder location. That's a good thing as it prevents you from filling up your disk with a lot of tables which you don't need.
The WORK folder location will be different for every single SAS session. NOWORKTERM will prevent SAS from deleting the WORK folder when terminating BUT how are you going to know the folder name in a new session?
SAS tables use a two level name: <libref>.<table name>. If you ommit the <libref> and just write <table name> then SAS automatically uses the libref WORK for this table.
If there are tables which you want to keep then store them in a different directory for permanent tables. Simply use a two level name <libref>.<table name> with a libref other than WORK.
Eventually create define own libname for this or use a libref which already exists and has been created for such permanent storage.
Another automatically created libref which will always point to your personal folder for permanent tables is SASUSER.
data sasuser.test;
var='just a test';
run;
proc print data= sasuser.test;
run;
To copy all tables from your current WORK folder to SASUSER:
proc datasets lib=sasuser nolist nowarn;
copy in=sasuser out=permwork;
run;
quit;
And if you want to know where librefs point to (printed to SAS log):
%put WORK: %sysfunc(pathname(work));
%put SASUSER: %sysfunc(pathname(sasuser));
The path for SASUSER will always be the same, the path for WORK will be different between SAS sessions.
... View more