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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1088 views
  • 0 likes
  • 2 in conversation