Hello
What is the reason that I get error?
The task is tom list memebers of agefmt format
27 select agefmt.;
_______
22
201
ERROR 22-322: Syntax error, expecting one of the following: a name, $, @.
ERROR 201-322: The option is not recognized and will be ignored.
Please post the WHOLE log of the step that fails, and (this is ESSENTIAL) use the </> button to post it.
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26 proc format;
27 value agefmt
28 0-18='0-18'
29 18-high='18+'
30 ;
NOTE: Format AGEFMT is already on the library WORK.FORMATS.
NOTE: Format AGEFMT has been output.
31 run;
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 99.31k
OS Memory 22948.00k
Timestamp 08/16/2020 10:57:29 AM
Step Count 33 Switch Count 0
Page Faults 0
Page Reclaims 9
Page Swaps 0
Voluntary Context Switches 4
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
32
33 proc format library=work.formats fmtlib;
34 select agefmt.;
_______
2 The SAS System 07:21 Sunday, August 16, 2020
22
201
ERROR 22-322: Syntax error, expecting one of the following: a name, $, @.
ERROR 201-322: The option is not recognized and will be ignored.
NOTE: The previous statement has been deleted.
35 run;
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 136.34k
OS Memory 22948.00k
Timestamp 08/16/2020 10:57:29 AM
Step Count 34 Switch Count 0
Page Faults 0
Page Reclaims 42
Page Swaps 0
Voluntary Context Switches 1
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
NOTE: No formats found that match SELECT statement.
NOTE: The SAS System stopped processing this step because of errors.
36
37
38 GOPTIONS NOACCESSIBLE;
39 %LET _CLIENTTASKLABEL=;
40 %LET _CLIENTPROCESSFLOWNAME=;
41 %LET _CLIENTPROJECTPATH=;
42 %LET _CLIENTPROJECTPATHHOST=;
43 %LET _CLIENTPROJECTNAME=;
44 %LET _SASPROGRAMFILE=;
45 %LET _SASPROGRAMFILEHOST=;
46
47 ;*';*";*/;quit;run;
48 ODS _ALL_ CLOSE;
49
50
51 QUIT; RUN;
52
Use next code to list a format or formats:
proc format lib=work; /* or any other library */
select agefmt; /* enter one or more format names separated by space */
run;
In case of char type format name is preceded by $.
USE THE </> BUTTON FOR POSTING LOGS!
In the SELECT statement, do not use a trailing dot for the format name.
The SELECT statement just wants the NAMES of the formats to select. It does not what you to enter a full format specification. Remove the period.
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!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: