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 (December 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 24 Dec 2008 12:45:14 -0500
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Subject:      Re: Multiple variable length text files

On Wed, 24 Dec 2008 12:08:22 -0500, Ian Whitlock <iw1sas@GMAIL.COM> wrote:

>Howard wrote in part: > >>How about following up on an earlier suggestion to use the >>@[character-literal] mechanism. This works: > > >>data two; >> infile csv("*.csv") dsd; >> input @'Spreadsheet: xyz' ID $3. time $2. >> @'"Average",' (2* AvgSatCals AvgProtein)($) >> @'"% Recommendation",' (2*PctRecSatCals PctRecProtein)($) >> ; >> run; > >I was most surprised to see that the "2*" notation worked on the INPUT >statement. It is documented for the PUT statement,

and there only preceding a character literal, I believe

>but is there any hint of its working on INPUT? > >Apparently it also work in this context, albeit not so useful. > > data _null_ ; > input @3*'-' x ; > put x= ; > cards ; > 1 2 ---3 4 > ;

It also seems to work on informats. I run this

data _null_; input (Var1-Var6)( 2 * 1. 2 * $1. 2 * date9. ); put Var1-Var6; cards; 34ab01Jan196024Dec2008 ;

I see: 3 4 a b 0 17890

> > >-- >Ian Whitlock


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