BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ksharp
Super User

There is one thing I am worried about.

Judu  Female   A  Credit Card

Judu  Female   B  Cash

what you are going to count ?

Xia Keshan

qazwsxedc
Calcite | Level 5

Keshan,

Thank you so much for your help.  One more thing I really need your kind help.

I try to import the sample file (attached in my original post) into SAS but failed.   Could you please let me know what's wrong are my codes?  Thanks a lot.

---------------- Codes I used ------------------

data work.mydata

      infile 'C:\SAS\Output\Customer Sample.csv';

      informat Custom $10.;

      informat Gender $10.;

      informat Product $10.;

      informat Payment $10.;

      input

            Custom $

            Gender $

            Product $

            Payment $

run;

proc contents data=work.mydata;

run;

----------------------------------


---------- Error message ---------

ERROR: No DATALINES or INFILE statement.

ERROR: Extension for physical file name "C:\SAS\Output\Customer Sample.csv" does not correspond

       to a valid member type.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.MYDATA may be incomplete. When this step was stopped there were 0

         observations and 5 variables.

WARNING: The data set WORK.INFILE may be incomplete. When this step was stopped there were 0

         observations and 5 variables.

WARNING: Data set WORK.INFILE was not replaced because this step was stopped.

---------------------------------------------

Ksharp
Super User

data work.mydata ;


you missed ';'

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 17 replies
  • 23647 views
  • 3 likes
  • 5 in conversation