Creating JCL to execute a large merged file of SQL for DB2

105 pts.
Tags:
IBM DB2
JCL
SQL
I need to create a JCL that will execute - individually - SQL statements within a merged file (multiple SQL) and write the SQL results to a single output file. Suggestions?

Answer Wiki

Thanks. We'll let you know when a new response is added.

RUNSQLSTM will run multiple SQL statements

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jonty Walker
    Thanks Greybeard52; That looks like a viable solution to my problem. If I'm reading the WIKI SEARCH on RUNSQLSTM correctly, the length of input file or the number of SQL statements in that file is NOT an issue. COOL! Are there ANY concerns with using RUNSQLSTM w.r.t. the SELECT statement (that you know of) ?
    105 pointsBadges:
    report
  • graybeard52
    Well, yes. RUNSQLSTM is designed for batch use, so it cannot return a result set. You can create tables, views, updates, etc. To use SELECT, it must be inserting the records into a table, which is what I think you want to do. Otherwise, just put a semi-colon at the end of each statement.
    3,115 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following