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

I imported a JMP file with a variable that has some formatting SAS doesn't like. I can't change the formatting because I can't read the file to see what the problem is  (see log in italics below), and it won't delete because of the formatting problem. 

 

The variable is unnecessary. I just want to get rid of it. Is there a workaround? Thanks.


38 PROC PRINT data=monseau.control_ALL;
39 run;

ERROR: Format SCAN_QUA not found or couldn't be loaded for variable
Scan_Quality4___L_eye_not_so_goo.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


40 DATA monseau.control_ALL;
41 DROP Scan_Quality4___L_eye_not_so_goo;
42 SET monseau.control_ALL;
43 RUN;

ERROR: The format SCAN_QUA was not found or could not be loaded.
NOTE: The SAS System stopped processing this step because of errors.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Change the system option that is causing the missing format to be treated as an ERROR.

options nofmterr;

Now you can use the dataset.

View solution in original post

4 REPLIES 4
Tom
Super User Tom
Super User

Change the system option that is causing the missing format to be treated as an ERROR.

options nofmterr;

Now you can use the dataset.

newtriks
Obsidian | Level 7

Thank you!

Reeza
Super User
options nofmterr;

Add the following option before your code and it will remove the format if it's not found so you'll see the underlying value. 

 

 

FreelanceReinh
Jade | Level 19

Without changing the FMTERR option setting you could use the DROP= dataset option (instead of the DROP statement) as in

monseau.control_ALL(drop=Scan_Quality4___L_eye_not_so_goo)

to drop the offending variable in the DATA step or to exclude it in the PROC PRINT step.

 

To see the unformatted values in the PROC PRINT step, you could also use a FORMAT statement:

proc print data=monseau.control_ALL;
format Scan_Quality4___L_eye_not_so_goo;
run;

 

 

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
  • 4 replies
  • 509 views
  • 0 likes
  • 4 in conversation