home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!darwin.sura.net!paladin.american.edu!auvm!CLEMSON.BITNET!SUMA
- From: SUMA@CLEMSON.BITNET
- Newsgroups: bit.listserv.sas-l
- Subject: follow up question
- Message-ID: <SAS-L%92110916232306@AWIIMC12.IMC.UNIVIE.AC.AT>
- Date: 9 Nov 92 15:21:00 GMT
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- Reply-To: SUMA@CLEMSON.BITNET
- Lines: 59
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
-
- To try and answer my own question I ran the following short program
- //CHECK JOB TIME=(,16)
- /*JOBPARM Q=H
- //*
- //*
- // EXEC SAS518
- data check; input b c d;
- cards;
- 10 5 2
- 12 4 3
- 12 0 6
- 12 . 2
- 12 3 5
- 10 2 5
- 10 2
- 12 2 1
- 8 2 4;
- proc print; var b c d;
- data new; set check;
- a=b/c ;
- x=c/d ;
- proc print; var a x;
- The program ran with error message and gave the foll output.
- Values for b c and d were not printed.
- Following values were printed for a and x
- 1. 2 2.5
- 2. 3 1.33
- 3. . 0
- 4. . .
- 5. 4 0.6
- 6. 5 0.4
- 7. 5 0.17
-
- I observed that sas treats any 0 or missing value for c represented
- as . as a missing value and prints the corresp value of a as .
- That is just great! the problem only occurs when a missing value in
- a dataset is represented as a blank space.
- Now I have a follow up question.
- When you use SAS to read a data set and write out data in a real
- binary format (rb.) how does SAS store the missing values?
- Are the missing values stored as . or as a blank space?
- I used SAS to read some data and stored the data in real binary format.
- I then read the same data in another program using SAS like this
- DATA CDAT; INFILE CDAT ;
- INPUT @1 CUSIP $ SIC ZLIST FILE FYR YEAR SMBL $ adate
- TYPE $ OUTCOME $ BIDDER BIDNUM tapeyr
- (X1 X2 X4 X5 X6 X9 X10 X11 X12 X13 X14 X15 X16 X18 X21 X24 X25 X26
- X30 X34 X41 X44 X52 X58 X60 X108 X111 X114 X115 x181) (RB.);
- I now have following statemnts such as A = X9/X6;
- IF I omitted to include a statement such as
- if x6 = 0 or x6=. then a=.;
- else a= x9/x6;
- would SAS automatically take care of the missing and zero values by
- default given that
- CDAT was created using a put statement identical to
- the input statement mentioned above?
- Any replies would be greatly appreciated.
- Uma
- SUMA@CLEMSON
-