PeterC,
Thanks for the reply. It looks like to me their are a few different ways to do this. prxparse is not working as I expected though. I ended up using translate although I like how your method protects the commas that are not delims.
This seemed to work:
global serverOS infdlm;
let origfile =
%let newfile =
%let serverOS = %substr(&sysscp,1,2);
/* Macro to set tab delimeter */
%macro setdlm;
/* Windows */
%if (&serverOS eq WI) %then %do;
%let infdlm='09'x;
%end;
/* Unix */
%else %if (&serverOS eq HP) %then %do;
%let infdlm='09'x;
%end;
/* zOS */
%else %if (&serverOS eq OS) %then %do;
%let infdlm='05'x;
%end;
%else %do;
%put ERROR: Invalid value specified for serverOS;
%end;
%mend setdlm;
%setdlm;
/* Datastep to turn comma delim file to tab delim */
/* on a Windows Unix MVS Operating System */
data _null_;
file "&newfile" LRECL = 5000;
infile "&origfile" LRECL = 5000 TRUNCOVER;
input;
_infile_ =translate(_infile_,&infdlm,',');
put _infile_;
run;
... View more