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 (June 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 14 Jun 2006 18:59:27 -0700
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: Running a perl program, PIPEing the output
In-Reply-To:  <>
Content-Type: text/plain; format=flowed

kviel@EMORY.EDU replied: >On Wed, 14 Jun 2006, David L Cassell wrote: > > > Excellent advice! Okay, now you're my official respondent for all > > PROC SURVEYSELECT questions that get asked over the next couple > > weeks while I'm out of town. Ken will answer the PRX function > > questions, Peter will jump on stepwise regression questions, and I'm > > sure someone will step into the void to be mean to people who are > > taking inefficient approaches to data handling. Ken suggested that > > the word 'minion' be used. Which means... > >Uh-oh! I see that you left off the person responsible for advising the >use of a one line perl script. I guess that means I should ask this

Well, Bob isn't around much anymore, and Alan insisted on advising people to write it in C#, so ... :-)

>question now, and blame haste as the culprit for its amorphous nature... > >I have a perl module that I use to write a CSV file to a repository. The >file turns out to be as large as its source. This is no good. Is it >possible to call the perl script from SAS but PIPE in the output data? >I would therefore avoid a "duplicate" file? > >Thanks,

Yes. And no.

Yes, you can use the FILENAME PIPE engine to feed the STDOUT of the Perl process directly into a data step.

But no, if you are on a Windows machine, the pipe writes to a temporary file, so you can't completely avoid that 'duplicate file on the hard drive' issue. If you're on a unix box, the pipe works just the way you want.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Donít just search. Find. Check out the new MSN Search!

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