Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Wed, 21 Mar 2007 @ 15:12:59 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Using FastEXport with Named Pipes
 
From:   Akshay Tyagi

Hi Basler Jiri,

I am using following SAS script to read from NAMED PIPE:

     /* This code uses NAMEDPIPES. */

     x 'mknod /saswork/named_pipe p';

     /*FILENAME p1 '/saswork/named_pipe' RECFM=N;*/

     FILENAME p1 '/saswork/named_pipe';

     data nemospde.tznx655_prod_vol_Pipe(partsize=2047);

     INFILE p1;
     INPUT
     Len                             ib2.
     BILLING_MONTH_YEAR_NO           $6.
     LEVEL_2_VOLUME_PRODUCT_ID       ib4.
     DERIVED_LANGUAGE_Len          ib2.
     DERIVED_LANGUAGE_NM             $varying30. DERIVED_LANGUAGE_Len
     NON_PUBLISHED_CD                ib4.
     RESPONSIBLE_SALES_CHANNEL_Len ib2.
     RESPONSIBLE_SALES_CHANNEL_ID    $varying30.
     RESPONSIBLE_SALES_CHANNEL_Len
     SALES_ENTITY_CD_Len           ib2.
     SALES_ENTITY_CD                 $varying50. SALES_ENTITY_CD_Len
     SATISFACTION_SCORE              ib4.
     SBC_LD_ACCT_IND                 $1.
     SBCIS_ACCT_IND                  $1.
     SBCIS_JOINT_BILLED_IND          $1.
     SBCLD_JOINT_BILLED_IND          $1.
     SEGMENT_VALUE_CD_Len          ib2.
     SEGMENT_VALUE_CD          $varying30. SEGMENT_VALUE_CD_Len
     ;

     RUN;

In your FastExport script, you are using:

     .EXPORT OUTFILE \\.\pipe\mypipe_001;

This works well in Windows. But while reading in UNIX, following error is thrown: Invalid device.

I am trying to write into the NAMED PIPE created above (/saswork/named_pipe) using:

     .LOGTABLE cdw_spool.SAS_AT_LOG01;
     .LOGON edwd/at9261,at12nemo;
     DATABASE nemo_reporting_views;
     .BEGIN EXPORT SESSIONS 64;

     SELECT
     BILLING_MONTH_YEAR_NO (CHAR(6)),
     CAST(LEVEL_2_VOLUME_PRODUCT_ID as INTEGER FORMAT '99999999' ),
     DERIVED_LANGUAGE_NM (VARCHAR(30)),
     CAST(NON_PUBLISHED_CD as INTEGER FORMAT '99999999' ),
     RESPONSIBLE_SALES_CHANNEL_ID (VARCHAR(30)),
     SALES_ENTITY_CD (VARCHAR(50)),
     CAST(SATISFACTION_SCORE as INTEGER FORMAT '99999999' ),
     SBC_LD_ACCT_IND (CHAR(1)),
     SBCIS_ACCT_IND (CHAR(1)),
     SBCIS_JOINT_BILLED_IND (CHAR(1)),
     SBCLD_JOINT_BILLED_IND (CHAR(1)),
     SEGMENT_VALUE_CD (VARCHAR(30))

     FROM nemo_reporting_views.vznx655_prod_vol_combined

     WHERE
     LEVEL_2_VOLUME_PRODUCT_ID = 10001004
     AND CBSA_CD = '26900'
     and NON_PUBLISHED_CD <> 10
     and WIRELINE_VNBLT_SCORE_GRP_CD = 10
     ;

     /*.EXPORT OUTFILE /saswork/named_pipe mode record FORMAT BINARY;*/

     .EXPORT OUTFILE /saswork/named_pipe mode record;
     .END EXPORT;
     .LOGOFF;

Only problem is I can't use RECFM=N to read binary data, which was working fine when using flat file instead of named pipes. Has any one faced such issue?


Thanks & Regards

AKSHAY TYAGI



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020