Date: Fri, 6 Aug 2010 14:40:03 -0400
Reply-To: "Viel, Kevin" <kviel@SJHA.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Viel, Kevin" <kviel@SJHA.ORG>
Subject: Re: SAS INFILEing a perl program using a PIPE
Content-Type: text/plain; charset="us-ascii"
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Tom
> Sent: Friday, August 06, 2010 1:44 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: SAS INFILEing a perl program using a PIPE
> I am not sure I understand your problem.
> I interpretted as:
> How can I write to different files based on data step logic?
> The answer is the FILEVAR option of the FILE statement.
> For example this trivial program will create two new files (test1.dat and
> test2.dat) and write the line 'test' to each of them.
> data _null_;
> input filename $20.;
> file out filevar=filename ;
> put 'test';
The problem is even simpler than that and rears if I use only one FILE destination and one INFILE source:
2580 FileName ABI_Seq pipe "perl C:\Perl\Programs\ABI_Seq.ps" ;
2582 Data _null_ ;
2584 __AB1 = "C:\A19.ab1" ;
2586 File "C:\ABI_path.txt" ;
2587 Put __AB1 ;
2588 File Log ;
2590 Length __Amplicon_Poly $ 5000 ;
2592 Infile ABI_Seq ;
Note that on line 2586 I attempt to write to a text file (successfully), but then perl program (line 2592) fails. If I comment out line 2586, then the perl program works as intended.
I had been doing that in TWO different datasteps within a macro file-by-file.
Kevin Viel, PhD
Senior Research Statistician
Patient Safety & Quality
International College of Robotic Surgery
Saint Joseph's Translational Research Institute
Saint Joseph's Hospital
5671 Peachtree Dunwoody Road, NE, Suite 330
Atlanta, GA 30342
(678) 843-6076: Direct Phone
(678) 843-6153: Facsimile
(404) 558-1364: Mobile
This e-mail, including any attachments is the
property of Catholic Health East and is intended
for the sole use of the intended recipient(s).
It may contain information that is privileged and
confidential. Any unauthorized review, use,
disclosure, or distribution is prohibited. If you are
not the intended recipient, please delete this message, and
reply to the sender regarding the error in a separate email.