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;

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 765 views
  • 2 likes
  • 3 in conversation