I curious if there are any SAS Users out there that know of good message board/forums for programming help and discussion. I’m relatively new to it and although its a ridiculous easy language, I still come up with some questions.
Thanks.
I curious if there are any SAS Users out there that know of good message board/forums for programming help and discussion. I’m relatively new to it and although its a ridiculous easy language, I still come up with some questions.
Thanks.
I do believe those are the worst two sentances ever written.
My apologies to proof-reading people everywhere.
The most I ever needed was the SAS documentation, but I was doing some pretty simple stuff. Maybe that’ll help.
I’ve used the SAS to topple a couple regimes and had one or two pesky foreign diplomats bumped off. They were very nice about it and did excellent work but I don’t think they have message boards for those activities.
There’s a Usenet newsgroup **comp.soft-sys.sas ** that looks pretty active. I must remember to post there one of these days to find out how to get rid of trailing blanks when using informats.
Thanks.
Won’t the TRIM(LEFT(var)) remove your blanks? I don’t think you can get an informat that resizes to your variables length.
Thanks for the suggestion but TRIM(LEFT(var)) leaves me with one trailing blank at the end of the branch and region names. This drives me nuts. Nothing I could find in the SAS documentation works.
BRANCH = PUT(STATE,$BRCHFMT.) ;
REGION = PUT(STATE,$REGNFMT.) ;
BRANCH = TRIM(LEFT(BRANCH)) ;
REGION = TRIM(LEFT(REGION)) ;
I’m confused.
Say your informats $BRCHFMT. and $REGNFMT. have a length of 3 and you are storing a statecode like ‘MD’. Even if you Trim(left(‘MD’)) since you restore it in variables Branch and Region, you’ll still get a trailing space because of the informat length.
Me too.
STATE is a 1-2 character numeric state code that’s read in from a database.
$BRCHFMT. & $REGNFMT. take that state code, create the variables BRANCH and REGION and assign a branch and region such as Eastern Branch, Western Branch, Eastern Region, etc. (Me, I woudn’t do it this way in the first place but that’s the way my boss likes to do it and I’m stuck with it.)
When I do that, I always get a trailing blank at the end of the region and branch name.
When I add the TRIM code I’m not trying to trim STATE, I’m trying to trim the branch/region name that was applied by the informat.
Are you using a PROC Format to create the $BRCHFMT. and $REGNFMT.? What’s the code there?
We might just turn the SDMB into the SAS Forum I was looking for…
PROC FORMAT ;
‘10’ = 'ILLINOIS ’
‘12’ = 'ILLINOIS ’
‘72’ = 'ILLINOIS ’
‘13’ = 'GREAT LAKES ’
‘14’ = 'MID PLAINS ’
‘15’ = 'MID PLAINS ’
‘21’ = 'GREAT LAKES ’
‘22’ = ‘NORTHERN PLAINS’
etc.
;
Those actually have the same number of characters/spaces but the font is making it look like some have fewer. Northern Plains is the longest region name.
I forgot to paste in:
VALUE $REGNFMT
under the PROC FORMAT in my last post.