BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I'm trying to put leading zeroes into one of the fields & get this error.
--------------------------------

832 input dataid $ cls_lab_id $ aliquot $ type $ date $ audit $;
NOTE: SCL source line.
833 cls_lab_id = put (cls_lab_id, Z6.);
---
48
ERROR 48-59: The format $Z was not found or could not be loaded.
---------------------------------

Any idea? Thank you.
James
2 REPLIES 2
DouglasMartin
Calcite | Level 5
It's because cls_lab_id is a character field, but Z6. is a numeric format. SAS tried substituting $Z. instead (i.e. a character format), but there's no such format as $Z.

You could either make appropriate use of string manipulation functions (the best idea unless you are sure there are only digits in cls_lab_id), or if it contains only digits you could say something like
cls_lab_id=(put(input(cls_lab_id,6.),Z6.);
deleted_user
Not applicable
Thank you!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4659 views
  • 0 likes
  • 2 in conversation