BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
skallamp
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
Doc_Duke
Rhodochrosite | Level 12

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

View solution in original post

2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12

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

Geraldo
Fluorite | Level 6

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

SAS Innovate 2025: Call for Content

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!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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