Date: Tue, 10 Aug 2004 07:55:58 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: smart ways for formating value?
Hi Jay -
I agree using a datastep and ctrlin is the best automated way to create a
format like this, but having said that, if you just need the format this
once, writing it should be a snap if you fully use your editor features.
In your non-enhanced SAS editor and the num command shows line numbers. Line
commands can be used on the line numbers for working with blocks of
repetitious code like in formats. Once you type 10000-<15000='lt15k' then
use the r13 line command to repeat it 13 times. Put your cursor in
over-write mode (insert key) and type in the correct numbers, vertically is
much faster than horizontally. After you repeat it with r13 if you copy
paste it (ctrl-c ctrl-v) into the enhanced editor you can select columns of
code by holding down your alt key why dragging your mouse. Then ctrl-v will
insert-paste the column. Knowing your editor features it should take under
30 seconds to create a format like your example.
Elsewhere in the list you'll hear that Utra-Edit is the way to go. I use a
combination of the SAS enhanced and non-enhanced, Excel and Word, and ISPF
occasionally. Any editing environment leads to different styles of coding
due to its unique features. Enhanced editors like SAS's or Ultra-Edit are
extremely useful because they highlight the code as you type, displaying
potential syntax problems as you work.
DDS Data Extraction
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of ougya
Sent: Tuesday, August 10, 2004 6:42 AM
Subject: smart ways for formating value?
Hi, I was tying the following code, as you will see it is tedious to
type format. Wondering anyone has a smart way to minimize the pain?
proc freq data=a;
format cbal cbalf.;