BookmarkSubscribeRSS Feed
Q1983
Lapis Lazuli | Level 10

proc format;

value $mystage

'PROD OPS #:Apps' =  'PROD OPS #: APPS'

'PROD OPS #:Closed' = 'PROD OPS #: CLOSING'

'PROD OPS #:Processing' = 'PROD OPS #: PROCESSING'

'PROD OPS #:Underwriting' =     'PROD OPS #: UNDERWRITING'

;

;

run;

 

data loancount_;

set loancount;

length stage $85;

length processing_center purps_cd $55;

if PROCESSING_CENTER eq '' then processing_center = 'NO_LOB';/*2538283*/

if UNDERWRITING_CAMPUS eq '' then UNDERWRITING_CAMPUS = 'NO_LOB';/*2538283*/

if Closing_CAMPUS eq '' then Closing_CAMPUS = 'NO_LOB'; /*2538283*/

stage = put(stage,mystage.);

processing_center = put(processing_center,myproc.);

purps_cd = put(purps_cd,mypurp.);

run;

 

The report populates however when it encounters the 'PROD OPS #:Underwriting' =     'PROD OPS #: UNDERWRITING'

It truncates (leaves off) the g.  It just shows UNDERWRITIN   All other stages display without incident.  When I truncate the space in proc format for Underwriting it displays ok.  Is there a limit on character length?  I realize Underwriting has the longest length in this example.

1 REPLY 1
PaigeMiller
Diamond | Level 26

Since I don't have your data, I can't run your code (and you should really show us the log so we can see the code and any ERRORs, WARNINGs and NOTEs, although I assume you have looked there already).

 

What if you assign a default length for the format, such as 

 

value $mystage(default=55) ...

And you are missing a $, are you not?

 

stage = put(stage,$mystage.);

 

 

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 807 views
  • 0 likes
  • 2 in conversation