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!

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

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