DATA Step, Macro, Functions and more

export with a control A character as delimiter

Reply
Super Contributor
Posts: 673

export with a control A character as delimiter


How to export with a control A character as delimiter and not giving any file extension like .txt or csv. just a flat file and no column names in output file.

   proc export data=qc1

  outfile='/idn/crdc//link/qc1

dbms=dlm;

        delimiter='01x';

replace;

putnames=no;

run;

Respected Advisor
Posts: 3,799

Re: export with a control A character as delimiter

You have the syntax a bit off.  Here I create a TEMP file write to it and use a data step to look at.

filename FT48F001 temp;
proc export data=sashelp.class outfile=FT48F001 replace DBMS=DLM;
   DELIMITER='01'x;
  
PUTNAMES=no;
   run;


data _null_;
  
infile FT48F001;
   input;
  
list;
  
run;
PROC Star
Posts: 7,492

Re: export with a control A character as delimiter

Like data_null_ suggests:

1. remove the semicolon after dbms=dlm

2. change your delimiter option from delimiter='01x'; to

     delimiter='01'x;

but also 3.  end your outfile statement filename with a single quote since you began it with a single quote.

Ask a Question
Discussion stats
  • 2 replies
  • 1496 views
  • 2 likes
  • 3 in conversation