|
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Viel,
> Kevin
> Sent: Friday, August 06, 2010 1:27 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: SAS INFILEing a perl program using a PIPE
>
> I am attempting to use SAS to INFILE a PIPE'ed perl program. I need to
> direct the perl program to the file of interest, which changes with every
> observation. I kludged this by writing to another generically named file,
> whose is constant. I seem to be having a problem with a FILE followed by
> INFILE statement:
>
>
>
> 2580 FileName ABI_Seq pipe "perl C:\Perl\Programs\ABI_Seq.ps" ;
> 2581
> 2582 Data _null_ ;
> 2583
> 2584 __AB1 = "C:\A19.ab1" ;
> 2585
> 2586 File "C:\ABI_path.txt" ;
> 2587 Put __AB1 ;
> 2588 File Log ;
> 2589
> 2590 Length __Amplicon_Poly $ 5000 ;
> 2591
> 2592 Infile ABI_Seq ;
> 2593
> 2594 Input __Amplicon_Poly ;
> 2595
> 2596 Stop ;
> 2597
> 2598 Run ;
>
> NOTE: The file "C:\ABI_path.txt" is:
> Filename=C:\ABI_path.txt,
> RECFM=V,LRECL=256,File Size (bytes)=0,
> Last Modified=06Aug2010:13:21:34,
> Create Time=16Dec2009:15:58:29
>
> NOTE: The infile ABI_SEQ is:
> Unnamed Pipe Access Device,
> PROCESS=perl C:\Perl\Programs\ABI_Seq.ps,
> RECFM=V,LRECL=256
>
> NOTE: 1 record was written to the file "C:\ABI_path.txt".
> The minimum record length was 96.
> The maximum record length was 96.
> Stderr output:
> Use of uninitialized value $file in scalar chomp at
> C:\Perl\Programs\ABI_Seq.ps line 11.
> Use of uninitialized value $file in string at C:\Perl\Programs\ABI_Seq.ps
> line 15.
> Could not open in ABITrace::set_file_handle
> at C:\Perl\Programs\ABI_Seq.ps line 15
> NOTE: 0 records were read from the infile ABI_SEQ.
> NOTE: DATA statement used (Total process time):
> real time 0.09 seconds
> cpu time 0.00 seconds
>
>
> 2599
> 2600
> 2601
> 2602 FileName ABI_Seq pipe "perl C:\Perl\Programs\ABI_Seq.ps" ;
> 2603
> 2604 Data _null_ ;
> 2605
> 2606 __AB1 = "C:\A19.ab1" ;
> 2607
> 2608 * File "C:\ABI_path.txt" ;
> 2609 Put __AB1 ;
> 2610 File Log ;
> 2611
> 2612 Length __Amplicon_Poly $ 5000 ;
> 2613
> 2614 Infile ABI_Seq ;
> 2615
> 2616 Input __Amplicon_Poly ;
> 2617
> 2618 Stop ;
> 2619
> 2620 Run ;
>
> NOTE: The infile ABI_SEQ is:
> Unnamed Pipe Access Device,
> PROCESS=perl C:\Perl\Programs\ABI_Seq.ps,
> RECFM=V,LRECL=256
>
> C:\ A19.ab1
> NOTE: 1 record was read from the infile ABI_SEQ.
> The minimum record length was 256.
> The maximum record length was 256.
> One or more lines were truncated.
> NOTE: DATA statement used (Total process time):
> real time 0.21 seconds
> cpu time 0.00 seconds
>
>
> I would appreciate any comments or suggestions.
>
> Thanks in advance,
>
> Kevin
>
> 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
> kviel@sjha.org
> Confidentiality Notice:
> 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.
SAS needs to close the first file before perl can read it:
2661 FileName ABI_Seq pipe "perl C:\Perl\Programs\ABI_Seq.ps" ;
2662
2663 Data _null_ ;
2664
2665 __AB1 =
2665! "C:\Resequencing\F8\20100719\F8_P1_P4C1_Extraction_2010-07-13_17-28\0001_20100610_A10_F_1_
2665! A19.ab1" ;
2666
2667 FV = "C:\ABI_path.txt" ;
2668
2669 File Dummy Filevar = FV ;
2670 Put __AB1 ;
2671
2672 FV = "C:\Dummy.txt" ;
2673 File Dummy Filevar = FV ;
2674
2675
2676 Length __Amplicon_Poly $ 5000 ;
2677
2678 Infile ABI_Seq ;
2679
2680 Input __Amplicon_Poly ;
2681
2682 Stop ;
2683
2684 Run ;
NOTE: The infile ABI_SEQ is:
Unnamed Pipe Access Device,
PROCESS=perl C:\Perl\Programs\ABI_Seq.ps,
RECFM=V,LRECL=256
NOTE: The file DUMMY is:
Filename=C:\ABI_path.txt,
RECFM=V,LRECL=256,File Size (bytes)=0,
Last Modified=06Aug2010:15:42:12,
Create Time=16Dec2009:15:58:29
NOTE: The file DUMMY is:
Filename=C:\Dummy.txt,
RECFM=V,LRECL=256,File Size (bytes)=0,
Last Modified=06Aug2010:15:42:12,
Create Time=06Aug2010:15:42:12
NOTE: 1 record was written to the file DUMMY.
The minimum record length was 96.
The maximum record length was 96.
NOTE: 0 records were written to the file DUMMY.
NOTE: 1 record was read from the infile ABI_SEQ.
The minimum record length was 256.
The maximum record length was 256.
One or more lines were truncated.
NOTE: DATA statement used (Total process time):
real time 0.29 seconds
cpu time 0.03 seconds
I wonder if I owe Toby a Shiner. I'll begrudge him his dues because I am stuck in Atlanta and he is wallowing in San Antonio :(
-Kevin
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
kviel@sjha.org
Confidentiality Notice:
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.
|