home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Newsgroups: bit.listserv.sas-l
- Path: sparky!uunet!paladin.american.edu!auvm!uvvm!klassen
- References: <SAS-L%92121710560456@UGA.CC.UGA.EDU>
- Message-ID: <92352.141414KLASSEN@UVVM>
- Date: Thu, 17 Dec 1992 14:14:14 PST
- Reply-To: Melvin Klassen <KLASSEN@UVVM.BITNET>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- Comments: Warning -- original Sender: tag was NETNEWS@UVVM.UVIC.CA
- From: Melvin Klassen <KLASSEN@UVVM.BITNET>
- Subject: Re: input(put(.. question
- Lines: 22
-
- Jozsef Vitrai <VITRAI@NKI> writes:
- >I'd like to understand, can would anybody explain to me:
- >WHY doesn't the INPUT function work without the PUT?
- > ...
- >56 data w; dob=220111;
- >57 data test; set w;
- >58 datew_p =input(put(dob,$6.),yymmdd.);
- >WARNING: Variable DOB has already been defined as numeric.
-
- To remove this warning, change the informat from '$6.' to '6.'.
-
- >59 datewo_p=input(dob,yymmdd.);
- >NOTE: Numeric values have been converted to character
- > values at the places given by: (Line):(Column). 59:16
-
- SAS converts the numeric variable 'DOB' to a temporary character variable,
- using the 'BEST12.' format (see the middle of page 116 of "SAS(r) Language,
- Reference, Version 6, First Edition"). You then specified the 'YYMMDD6.'
- informat (the '6' is the default, according to page 653, ibid.).
- So, you're telling SAS to select 6 bytes (which, in your case, are always
- blank) and to ignore the next 6 bytes (which contain your string '220111').
- SAS obeys your commands, and stores a "missing" value into 'DATEWO_P'.
-