Teradata Macros

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
DS1
Charter Member
Charter Member
Posts: 29
Joined: Wed Mar 29, 2006 1:13 pm

Teradata Macros

Post by DS1 »

Hello everyone,

I am suppose to calll a teradata macro in DS job and pass parameters to it ...
Is the teradata macro the same as the stored procedure ?
How does macro differ from a teradata bteq script.

Thanks for reading

DS1
jharvat
Premium Member
Premium Member
Posts: 1
Joined: Fri Apr 07, 2006 11:39 am
Location: Cincinnati

Re: Teradata Macros

Post by jharvat »

Teradata macros and stored procedures are two different animals. They can do similar functions but you can do more programming logic in a stored procedure and you can also do DDL statements and execute dynamic SQL from a stored procedure. A quick check of the TD manuals should give you a better idea of the capabilities and shortcomings of both.

A BTEQ script, meanwhile, can contain one or more SQL statements and contain some basic error checking and branching logic. It is designed specifically to be run by the BTEQ utility. Macros and stored procedures are more portable in that they can be executed anywhere you can execute an SQL statement (SQL Assistant or equivalent software, etc.).

You should be able to execute a macro just like any custom SQL from a BTEQ Enterprise stage. Unfortunately, that is the extent of my knowledge. I would also like to know how you can pass dynamic parameters to a macro in DataStage. Can someone else fill in the blanks?

Thanks!

---
DS1 wrote:Hello everyone,

I am suppose to calll a teradata macro in DS job and pass parameters to it ...
Is the teradata macro the same as the stored procedure ?
How does macro differ from a teradata bteq script.

Thanks for reading

DS1
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Teradata Macros

Post by ray.wurlod »

jharvat wrote: I would also like to know how you can pass dynamic parameters to a macro in DataStage. Can someone else fill in the blanks?
See separate thread in server forum.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply