LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 19 Feb 2009 09:24:03 -0600
Reply-To:     "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Subject:      Re: Proc Format from SAS Dataset
Comments: To: Abc Unha <abcunha@yahoo.com>
In-Reply-To:  <200902191459.n1JBkbt5001973@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

Your data needs at least on more variable FMTNAME.

780 options stimer=0; 781 data have; 782 input Start:$16. Description &$64.; 783 cards;

NOTE: The data set WORK.HAVE has 2 observations and 2 variables.

786 ;;;; 787 run; ERROR: Missing FMTNAME variable. NOTE: The SAS System stopped processing this step because of errors. 788 proc format cntlin=have(rename=(description=label)); 789 run; 790

You can accomplish the desired result with a view.

791 data cntlin / view=cntlin; 792 retain fmtname 'school' type 'C'; 793 set have; 794 rename description=label; 795 run;

NOTE: DATA STEP view saved on file WORK.CNTLIN. NOTE: A stored DATA STEP view cannot run under a different operating system.

796 proc format cntlin=cntlin; NOTE: Format $SCHOOL has been output. 797 select $school; 797! *to see FMTLIB output; 798 run;

NOTE: There were 2 observations read from the data set WORK.HAVE. NOTE: There were 2 observations read from the data set WORK.CNTLIN.

On 2/19/09, Abc Unha <abcunha@yahoo.com> wrote: > I have a SAS dataset that contains Start value and end value. I would like > to create format using that SAS Dataset. I want create format only using > proc format (with out manipulating sas dataset) > > For e.g. > > Start Description > UGA University of Georgia > GTECH Georgia Tech > > I would like to read "Start" column and create a format to use Description. > > Is there anyway to directory read SAS dataset and creates format? >


Back to: Top of message | Previous page | Main SAS-L page