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.]
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