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 (February 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 17 Feb 2004 18:31:32 -0500
Reply-To:   Don Stanley <don_stanley@PARADISE.NET.NZ>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Don Stanley <don_stanley@PARADISE.NET.NZ>
Subject:   Re: Date on flat file field keeps turning up as 010100 (NEWBIE)
Comments:   To: cdarby@COVHS.ORG

On Tue, 17 Feb 2004 14:38:29 -0800, Chuck D <cdarby@COVHS.ORG> wrote:

>I'm trying to create a flat file on the mainframe from a sas dataset. >When the date is 'no value' or zeros I want it to fill the output >field with spaces but it continually puts 010100 no matter what I do. >The date in the sas dataset is PD3 and I believe it contains 00000. >Any ideas on what's up with this.

I would normally advise against trying to place spaces into a PD3 field. Spaces are character, PD3. is a PACKED NUMERIC format, and this could cause problems for downstream software reading the file.

However, if you MUST have spaces in there, you could try this format:

proc format ; value pd3spc .,0 = ' ' other = [pd3.] ; run ;

and use this as the output format:

put date pd3spc. ;

It should work (but I don't have a mainframe here to try it on).

Whenever I've faced this problem in the past, I have put '000000' into the field when the date was not valid, this seems to keep downstream readers happy.

Don


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