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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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