Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 24 Jul 2001 @ 15:31:59 GMT


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


Subj:   Import causing all-amp operation
 
From:   Mary M. Conley

I have a macro that does a single-amp delete from a table. The PI fields of the table are integer and decimal and the macro passes the fields in as character.

CREATE SET TABLE TABLE1T ,FALLBACK ,
     NO BEFORE JOURNAL,

     NO AFTER JOURNAL

     (

      I1  INTEGER FORMAT '9(9)' NOT NULL,
      D1  DECIMAL(11,6) FORMAT '9(5)' NOT NULL,
      I2  INTEGER FORMAT '9(10)' NOT NULL,

      DT1 DATE FORMAT 'YYYYMMDD',
      TM1 INTEGER FORMAT '9(6)',
      DT2 DATE FORMAT 'YYYYMMDD',
      TM2 INTEGER FORMAT '9(6)'
PRIMARY INDEX ( I1 ,D1 ,I2 );

REPLACE MACRO MACRO1
   (
     I1  (CHAR(09)),
     D1  (CHAR(05)),
     I2  (CHAR(10)),
     DT2 (CHAR(08))
   )
   AS
   (
     DELETE FROM TABLE1
      WHERE I1   EQ :I1
        AND D1   EQ :D1
        AND I2   EQ :I2
        AND DT2  EQ :DT2;
   );

But when I do an import and exec the macro, it turns into an all-amp operation.

.IMPORT DATA DDNAME=IMPORTDD
.SET RETRY OFF
.REPEAT *
 USING
  I1      (CHAR(9)),
  D1      (CHAR(5)),
  I2      (CHAR(10)),
  DT2     (CHAR(8))
 EXEC MACRO1
   (:I1,
    :D1,
    :I2,
    :DT2);

But when I change the macro parms to integer for the PI and also change the import parms to integer, then the import is single-amp operation.

REPLACE MACRO MACRO1
    (
      I1   (INTEGER),
      D1   (INTEGER),
      I2   (INTEGER),
      DT2  (INTEGER)
    )
    AS
    (
      DELETE FROM TABLE1
       WHERE I1  EQ :I1
         AND D1  EQ :D1
         AND I2  EQ :I2
         AND DT2 EQ :DT2;
    );

.IMPORT DATA DDNAME=IMPORTDD
.SET RETRY OFF
.REPEAT *
 USING
  I1   (INTEGER),
  D1   (INTEGER),
  I2   (INTEGER),
  DT2  (INTEGER)
 EXEC MACRO1
   (:I1,
    :D1,
    :I2,
    :DT2);

What is happening with the import to cause the all-amp operation when all the parms are character? It is normal practice in our shop for these parms to be sent in as character.


Thanks,

Shelly Conley



     
  <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: 15 Jun 2023