BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Ganesh1
Calcite | Level 5

Tried to create a simple PROC FORMAT. But the format proc is ignored and throwing error.

proc format;
70
70 ! value agcat 0-<11="Young" 11-14="Middle" 14>-17="Higher";
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant,
a missing value, ;, LOW, OTHER.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 200-322: The symbol is not recognized and will be ignored.
70 ! value agcat 0-<11="Young" 11-14="Middle" 14>-17="Higher";
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant,
a missing value, LOW, OTHER.
NOTE: The previous statement has been deleted.
71 run;
1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

The syntax does not support >- use <-

 

data_null___0-1706281934632.png

 

48         proc format;
49         value agcat 0-<11="Young" 11-14="Middle" 14<-17="Higher";
NOTE: Format AGCAT has been output.
50         quit;

 

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Maybe this is what you want

 

value agcat 0-<11="Young" 11-14="Middle" 14<-17="Higher";
--
Paige Miller
data_null__
Jade | Level 19

The syntax does not support >- use <-

 

data_null___0-1706281934632.png

 

48         proc format;
49         value agcat 0-<11="Young" 11-14="Middle" 14<-17="Higher";
NOTE: Format AGCAT has been output.
50         quit;

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 448 views
  • 2 likes
  • 3 in conversation