Removing line breaks when importing a CSV to SAS

Reply
Regular Learner
Posts: 1

Removing line breaks when importing a CSV to SAS

Hello, 

 

I am new to SAS and this is my first time posting. I am having issues removing line breaks when importing a CSV to SAS. I have tried using TERMSTR=CRLF, I have also tried using TRANWRD and TRANSLATE without any success.

 

 

The code below is what I am using for the import and I have attached a screenshot of the export with the line break once the data has been manipulated.

 

DATA WORK.ACC ;
%LET _EFIERR_ = 0;
INFILE CSV DELIMITER = ',' MISSOVER DSD FIRSTOBS=2 ;

INFORMAT Customer_Number $10.;
INFORMAT Account_Name $50.;
INFORMAT Billing_Street $50.;
INFORMAT Billing_City $50.;
INFORMAT Billing_State_Province $2.;
INFORMAT Billing_Zip_Postal_Code $7.;
INFORMAT Amount_Outstanding DOLLAR11.2;
INFORMAT Account_Status $20.;
INFORMAT Debts DOLLAR11.2;
INFORMAT Shipping_Street $50.;
INFORMAT Shipping_City $50.;
INFORMAT Shipping_State_Province $2.;
INFORMAT Shipping_Zip_Postal_Code $7.;
INFORMAT Phone $14.;
INFORMAT Mobile_Phone $14.;
INFORMAT Fax $14.;

FORMAT Customer_Number $10.;
FORMAT Account_Name $50.;
FORMAT Billing_Street $50.;
FORMAT Billing_City $50.;
FORMAT Billing_State_Province $2.;
FORMAT Billing_Zip_Postal_Code $7.;
FORMAT Amount_Outstanding DOLLAR11.2;
FORMAT Account_Status $20.;
FORMAT Debts DOLLAR11.2;
FORMAT Shipping_Street $50.;
FORMAT Shipping_City $50.;
FORMAT Shipping_State_Province $2.;
FORMAT Shipping_Zip_Postal_Code $7.;
FORMAT Phone $14.;
FORMAT Mobile_Phone $14.;
FORMAT Fax $14.;

INPUT Customer_Number
Account_Name
Billing_Street
Billing_City
Billing_State_Province
Billing_Zip_Postal_Code
Amount_Outstanding
Account_Status
Debts
Shipping_Street
Shipping_City
Shipping_State_Province
Shipping_Zip_Postal_Code
Phone
Mobile_Phone
Fax;

RUN;

 

 

 

Super User
Posts: 23,724

Re: Removing line breaks when importing a CSV to SAS

Posted in reply to konstantinokada
Ask a Question
Discussion stats
  • 1 reply
  • 183 views
  • 0 likes
  • 2 in conversation