Capturing the return code of bteq in shell variable

Tools & Utilities
Enthusiast

Capturing the return code of bteq in shell variable

Can any once please tell me how can i capture the return code retured by bteq script in shell?

Thanks in advance
Paddu
1 REPLY
Enthusiast

Re: Capturing the return code of bteq in shell variable

bteq << EoF
.logon xxxxx
...
.quit 23
EoF

_Ret=$?

echo $_Ret