BookmarkSubscribeRSS Feed
sasemp999
Calcite | Level 5

1.i am having sas 8.2 version.
2.proc import is not supporting in our servers.
3.i tried the below code for importing
4.input file----csv file
5.variable name length is more than -32 chars

My Code:


OPTIONS VALIDVARNAME=ANY;
filename read 'path/file.csv';
data new;
infile read firstobs=2;
input
'EVENT OUTCOME DATE' N
'EVENT REPORTED DAT' N
-
-
;
run;

i am getting errors:

'subject PROTOCAL NAME' N

           ___________________________
           22
           76
ERROR 22-322: Syntax error, expecting one of the following: a name, arrayname, #, (, +, /, //, ;, @, @@. 

ERROR 76-322: Syntax error, statement will be ignored.

8          'EVENT OUTCOME DATE' N

9          'EVENT REPORTED DATE' N

10         'var name ' N

12         'var name ' N

13         ' var name' N

NOTE: The SAS System stopped processing this step because of errors.
NOTE: SAS set option OBS=0 and will continue to check statements. This may cause NOTE: No observations in data set.
WARNING: The data set WORK.NEW may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.02 seconds


plese help me.............

1 REPLY 1
FloydNevseta
Pyrite | Level 9

When using name literals, there cannot be a space between the closing quote and the letter N. Delete the spaces and it should work.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 719 views
  • 0 likes
  • 2 in conversation