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
In-Reply-To: <199808191912.PAA04823@gate1.health.state.ny.us>
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.
HTH
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.
>
|