Desktop productivity for business analysts and programmers

SAS EG : Error while Importing the file

Accepted Solution Solved
Reply
Contributor
Posts: 32
Accepted Solution

SAS EG : Error while Importing the file

Hi,

I am not able to import the attached file using SAS EG. This is a comma seperated file and I gave this option while importing.

However, it is not delimiting properly.

Can some one please help me to get the code for importing this file.

Sample file attached with this.

Thanks,

+Sathyan

Attachment

Accepted Solutions
Solution
‎04-03-2012 08:23 AM
Trusted Advisor
Posts: 2,114

SAS EG : Error while Importing the file

get rid of the quotes.  SAS thinks you only have one variable.

View solution in original post


All Replies
Solution
‎04-03-2012 08:23 AM
Trusted Advisor
Posts: 2,114

SAS EG : Error while Importing the file

get rid of the quotes.  SAS thinks you only have one variable.

Occasional Contributor
Posts: 11

SAS EG : Error while Importing the file

This example for import without error.

data TEST_IMPORT;

infile '/sasworwk/SAS_workDADAEA/input.txt' dsd delimiter=',' firstobs=2;

/* change '"' for nothing */

input @;

_infile_ = prxchange('s/"//',-1,_infile);

length

       'Carrier ID'n 8.

       'Phr NPI'n 8.

       'Phr Network ID'n 8.

       'Phr Zip'n 8.

       'Drug Maintenance Code'n $1.

       'PHA Pharmacy State'n $2.

       'Gen Ind-Override'n $1.

       'GPI Number'n 8.

       'Customer Location'n $2.

       'U & C Flag'n 8.

       'Days Supply'n 8.

       'Zero Balance Claims Flag'n 8.

       'Extended AWP Cost'n 8.

       'Claim Counter'n 8.

       'Clt Ingred Cost Paid'n 8.

       'Clt Dispensing Fee'n 8.

       'Clt Due Amt'n 8.

       'Phr Ingred Cost Paid'n 8.

       'Phr Dispensing Fee'n 8.

       'Phr Due Amt'n 8.;

input

       'Carrier ID'n

       'Phr NPI'n

       'Phr Network ID'n

       'Phr Zip'n

       'Drug Maintenance Code'n $

       'PHA Pharmacy State'n $

       'Gen Ind-Override'n $

       'GPI Number'n

       'Customer Location'n $

       'U & C Flag'n

       'Days Supply'n

       'Zero Balance Claims Flag'n

       'Extended AWP Cost'n

       'Claim Counter'n

       'Clt Ingred Cost Paid'n

       'Clt Dispensing Fee'n

       'Clt Due Amt'n

       'Phr Ingred Cost Paid'n

       'Phr Dispensing Fee'n

       'Phr Due Amt'n;

run;

It´s

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 235 views
  • 0 likes
  • 3 in conversation