Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to run batch sql scripts on OS400

Status
Not open for further replies.

ddiamond

Programmer
Apr 22, 2005
918
US
If you want to run sql interactively on the OS400, you can use strsql. How would you go about running them in batch mode instead?
 
Easy buddy. Insert the sql statements in a source member then use runsqlstm over this member. You can NOT pass any parameters to the member though.
The best way is to create this little sqlrpgle as shown at my page below :

Note. If you can not read french, go to babelfish to get a so so page translation and request it to translate it:
The pgm code will bunch up but all of the text is now
readable in English, but I think it useless since there's not much text to read.

You can then use any sql stm (except "straight" select) using a normal call or callp or making your own command, in interactive and batch mode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top