Help...Help....please organize the code and ExecDOS syntax

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vans2003
Participant
Posts: 11
Joined: Thu Jan 27, 2005 10:38 am

Help...Help....please organize the code and ExecDOS syntax

Post by vans2003 »

Can someone please look at the following code and correct it..I wrote all differtent
pieces..and need syntax to call ExecDOS routine....

my problem here is to drop indexes before loading data into a teradat table using
Multiload Plugin..


--------Teradata Drop Index Macro-----------
REPLACE MACRO si_di_buyers AS (
DROP UNIQUE INDEX CI_BUYERS_U01 (
CLM_NBR
, SOURCE_ID
)
, INDEX CI_buyers_I01 (
CLM_NBR
)
ON EDW_Tables.buyers ;


--------------DropIndex.txt------------------
.logon Servername/username,password;

database EDW_Tables;

EXEC si_di_buyers;

.logoff
---------------------------------------------

--before/After subroutine------Input Values--

ExecDOS : buyers.bat ???????????
---------------------------------------------


buyers.bat
----------------------------not sure this-----
C:\PROGRA~1\NCR\TERADA~1\bin\BTEQ.exe < c:\DS7.5\DropIndex.txt
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you are doing this before/after job via the ExecDOS subroutine (equivalent to ExecSH on a UNIX server, I guess) all you need is exactly the same thing you'd need if you ran it from the command line.

Since your 'buyers.bat' file doesn't seem to need any parameters, all you'd put in the Input Value box would be the full path to the batch file.

-or-

If your batch file really is just one line, put that line there. No batch file needed in that case.

Can't help you on the BTEQ syntax. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
open DS manager go to Routines>Built-In>Before/After.
on the right side you'll see the ExecDos routine go over the code and you'll know how to use it.


IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
vans2003
Participant
Posts: 11
Joined: Thu Jan 27, 2005 10:38 am

Post by vans2003 »

When I execute the following from command prompt it's working..fine

--------------dropindex.bat-----------------
C:\PROGRA~1\NCR\TERADA~1\bin\BTEQ.exe < c:\DS7.5\DropIndex.txt
--------------------
I tied the following it's giving error...

ExecDOS : C:\PROGRA~1\NCR\TERADA~1\bin\BTEQ.exe < c:\DS7.5\DropIndex.txt

and

ExecDOS : dropindex.bat C:\DS7.5

Need some Syntax help.... any help would be appreciated....

Thanks,
Vans
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Set that dir part of your PATH
Post Reply