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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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