LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 1998, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 19 Aug 1998 18:05:01 -0400
Reply-To:     Douglas Dame <dougdame@HPE.UFL.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Douglas Dame <dougdame@HPE.UFL.EDU>
Subject:      Re: How to create a flat file using PROC CONTENTS
Comments: cc: sxh04@HEALTH.STATE.NY.US
In-Reply-To:  <>
Content-Type: text/plain; charset="iso-8859-1"

The contents data looks correct to me, the numerics have the SAS default lengths of 8 because nothing was coded to make them anything else. The "1." specified for variable named "num" tells SAS how to read the data, but that does not actually affect the attributes (for a numeric variable), so you need an explicit LENGTH (or attribute) statement if you want to do that.

Also you should generally store date variables as numerics, rather than as character variables, since this allows "date arithmetic" and also makes it easy to change the display characteristics of dates using different date formats (such as date7.). And save space, you can use a length of 4 for a date (not date-time) value under SAS on any operating system (or just 3 on MVS), versus the $8 you're using currently.


Douglas Dame Shands HealthCare - Gainesville FL

> > > > I am trying to create a flat file and a file layout from the output > of a PROC CONTENTS. Everything looks OK except one problems: all > numeric variables got length of 8 rather than their orginal length. >

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