BTEQ: Nested .run file

Tools & Utilities
Enthusiast

BTEQ: Nested .run file

Does BTEQ not allow nested .run file commands? I have a BTEQ script that has .run file. The file also has .run file in it. When the script reaches the end of the nested .run file command, it steps all the way out to the bteq script, but I want it to continue with the rest of the steps from the file referred to in the first .run file command. Is this not possible?
Tags (2)
4 REPLIES
Teradata Employee

Re: BTEQ: Nested .run file

remove the '.quit (or '.exit')' in the nested .run file

and it should work

Enthusiast

Re: BTEQ: Nested .run file

It's nothing to do with '.quit (or '.exit')' - as soon as the nested .run completes, the script goes back to the bteq script as opposed to the initial .run step as bmclare pointed out.

Does anyone have a solution for this?

-- Jonny
Fan

Re: BTEQ: Nested .run file

Hi Strickers,

According to the below, this is not possible:

http://www.info.teradata.com/htmlpubs/DB_TTU_14_00/index.html#page/Load_and_Unload_Utilities/B035_24...

"If you specify a RUN command within a run file, BTEQ switches and begins reading from the new file; BTEQ does not return to the previous file."

I would recommend coding the solution within the script itself rather than nesting the RUN commands.

Regards,

H

Enthusiast

Re: BTEQ: Nested .run file

Thanks Heps - I found this myself in the manual and will raise with Teradata to see if any plans to change this functionaility (seems like a big loss within BTEQ).

The easiest solution is to make the scripts less dynamic unfortunately. Thanks anyway.

-- Jonny