Hi Maggi.
Sorry I'm answering your questions in reverse time order.
Please see my previous response to your subsequent question.
IF you still really need to understand the process, the SAS Institute supplies an autocall macro
%DS2CSV(data=yourlibrary.yourSASdataset, runmode=b, csvfile=yourpath/yourfile.csv);
If you can follow SAS Macro code, have a look at the the source code for that macro.
It will be
ds2csv.sas
and it should be in one of your sas autocall locations for your UNIX SAS installation.
on my installation it is in the SAS install files in the
/core/sasmacro
folder
Cheers.
Damien