All Forums Tools
nshen_Infor 11 posts Joined 12/07
09 Jan 2008
How to create mulitple stored procedures in one file via BTEQ

Can I create more than one stored procedure per file when submitting the file through BTEQ?How do people create hundreds of stored procedures in batch?Thank you!Regards, Nancy

Regards, Nancy Infor Global Solutions, Mountain View, CA
famalau 43 posts Joined 08/07
16 Jan 2008

Hi Nancy,Have you tried to use the BTEQ tool in batch mode?Example:You may execute the following command line at the OS prompt: # bteq < test.txt where "test.txt" is a text file created in any text editor that is able to save text files, like Wordpad from windows, with the following content: .logon user,password create procedure p1 ..... ; create procedure p2...... ; create procedure pn ..... ; .logoffYou may find more details on running BTEQ in batch mode or interactive mode at BTEQ manual.I hope this helps!

Regards,

Fabio

joedsilva 505 posts Joined 07/05
16 Jan 2008

I am not sure if bteq can create stored procs online.....From my experience it always needs to be "compiled" if you are using bteq.so if you have multiple stored procs in different ddl files like thisproc1.ddlproc2.ddl........etcthen something like this is a recommended approachbteq <<END.logon;.compile file = proc1.ddl;.compile file = proc2.ddl;........END

joedsilva 505 posts Joined 07/05
16 Jan 2008

oops that's again a unix syntax ... ;)you would want to put the contents .logon;.compile file = proc1.ddl;.compile file = proc2.ddl;........into a file call compilesps.bteqand then do a bteq &1that would run the bteq file with all the compile statements and then ouput the error message to compilesps.bteq.log file

joedsilva 505 posts Joined 07/05
16 Jan 2008

some how I can't get the redirection operators to show up in the post ..Grr...so, well you know.... run the compilesps.bteq bteq file using bteq ;)

You must sign in to leave a comment.