Can we call bteq script in mload script.

Tools
Enthusiast

Can we call bteq script in mload script.

Hi,
Can we call bteq script in mload script.

Please advice. Thanks
4 REPLIES
Enthusiast

Re: Can we call bteq script in mload script.

Hi,
It is not possible to call a BTEQ script from within an MLoad script. What specifically are you trying to do here? If i understand you correctly, you are trying to use conditional flow control. If that is what you are trying, then it is not possible from within MLoad scripting. On the other hand, if you want features like flow control, then use BTEQ itself as the loading tool and you can branch to other section of scripts correspondingly based on your requirements.
Teradata Employee

Re: Can we call bteq script in mload script.

At least in a network attached environment you can use .SYSTEM to invoke any command line including BTEQ or something that calls BTEQ. On the mainframe you'd probably have to write your own "shell" program that could be called by .SYSTEM and would then call BTEQ. But why bother when you can check for errors directly within MLOAD's support environment?
Enthusiast

Re: Can we call bteq script in mload script.

you can use .OS command MLOAD utility within a BTEQ.
You will have to ensure that MLOAD executable path is set.

Here's a sample

.LOGON TDPID/UID,*****;

.export report file = rep.txt;

select * from DBC.COLUMNS SAMPLE 10;

.os mload < mload.txt;

.export reset;
.logoff;

.quit;

Hope this helps.

Vinay
Enthusiast

Re: Can we call bteq script in mload script.

Yes, I did it with the same way..

Thanks for your response..

Regards