Hi,
I have a requirement to create a thorn delimited text file. But I am not sure the delimiter option to be used in SAS to create one.
Sample Output with thorn delimiter highlighted:-
vJ7kn75NEl9244XnTWigCla568eToDVIySAfOOMdZkg=þYyYFumWrrBabvEPu/n7cNmhlOVu/8Rx0p0lRsYbwA10=þ2018-06-30þ0þ77984845669þþIþBþþ*þMSCGþ0þþ2018-06-30þREGþRþRþþþAIþOþOAþþ2011-01-10þMþ68216084þ60þ278702499þ00þþþOþ31
Can someone help here.
I think you're looking for 'FE'x. e.g.:
proc export data=sashelp.class dbms=dlm
outfile='/folders/myfolders/test.txt'
replace;
delimiter='FE'x;
run;
Art, CEO, AnalystFinder.com
You can use hex code literals, eg dlm='09'x is a tab. You need to know the hex code of your "thorn".
I think you're looking for 'FE'x. e.g.:
proc export data=sashelp.class dbms=dlm
outfile='/folders/myfolders/test.txt'
replace;
delimiter='FE'x;
run;
Art, CEO, AnalystFinder.com
data _null_;
set SASHELP.CLASS end=EFIEOD;
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
%let _EFIREC_ = 0; /* clear export record count macro variable */
file '/folder/folder/class.txt' delimiter='þ' DSD DROPOVER lrecl=32767;
format Name $8. ;
format Sex $1. ;
format Age best12. ;
format Height best12. ;
format Weight best12. ;
if _n_ = 1 then do;
put
'Name'
'þ'
'Sex'
'þ'
'Age'
'þ'
'Height'
'þ'
'Weight'
;
end;
do;
EFIOUT + 1;
put Name $ @;
put Sex $ @;
put Age @;
put Height @;
put Weight ;
;
end;
if _ERROR_ then call symput('_EFIERR_',1); /* set ERROR detection macro variable */
If EFIEOD then
call symput('_EFIREC_',EFIOUT);
run;
In between I built the above code and I am getting the same output. Do you expect any issues from the above code. ?
No!
'þ' and 'FE'x
represent the same character.
Art, CEO, AnalystFinder.com
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.