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 (July 1998, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 13 Jul 1998 19:44:34 -0400
Reply-To:     "Dorfman, Paul" <pdorfma@UCS.ATT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Dorfman, Paul" <pdorfma@UCS.ATT.COM>
Subject:      Re: SAS question
Comments: To: "ejmdaddybear@EMAIL.MSN.COM" <ejmdaddybear@EMAIL.MSN.COM>
Content-Type: text/plain

Joe McKnight <ejmdaddybear@EMAIL.MSN.COM> wrote:

>I am attempting to define a packed Julian date that can be written to a file >on the mainframe. Could someone please review the following SAS statements >and tell me what I am doing wrong. The program executes with no errors but >the date field on the file is written in error (as a missing value). I >remember coding something similar and cannot remember how it was coded. >Thanks in advance. > >date1 +AD0- put(1998273, pd4.0)+ADs- >file mastfile+ADs- >put +AEA-37 date1+ADs-

Joe,

There is nothing wrong with your code unless something strange is hidden behind +AEA-37. (I assume that +AD0- means '=', and +ADs means ';'). I reproduced your piece under OS/390, 6.09e:

53 DATA _NULL_; 54 DATE1 = PUT(1998273,PD4.0); 55 FILE 'USERID.TEST'; 56 PUT @1 DATE1 $4.; 57 RUN;

NOTE: 1 record was written to the file 'USERID.TEST'. NOTE: The DATA statement used 0.03 CPU seconds and 3590K.

and examined the first 4 bytes of the record written into 'USERID.TEST' in hex:

.q.. 1923 987C

which looks fine to me. I can only suggest that you compare the above with your code to see if any notable distinctions could be found.

By the way, it is not really necessary to first convert DATE1 into a character SAS variable representing DATE1 in packed decimal format if you are going to write it to a file in this format anyway. This:

68 DATA _NULL_; 69 DATE = 1998273; 70 FILE 'USERID.TEST'; 71 PUT @1 DATE PD4.; 72 RUN;

NOTE: 1 record was written to the file 'USERID.TEST'. NOTE: The DATA statement used 0.03 CPU seconds and 3590K.

works the same way.

Best regards, Paul.

++++++++++++++++++++++++++++++++++++++++ Paul M. Dorfman Citibank UCS Decision Support Systems Jacksonville, FL ++++++++++++++++++++++++++++++++++++++++


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