By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

JCL or CICS from store procedure

P: n/a
Dad
Is it possible to invoke JCL or CICS from a stored procedure? I am
working on a integration project in which I need one system to invoke
another. The plan is to write data into tables in DB2 and then call
existing programs to process the data. We don't have CICS TS or
similar, so I need a way to trigger backend processing.

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello,

yes, it's both possible!

A stored procedure can submit a batch job through the JES internal reader,
but you must provide a "//anyname DD SYSOUT=(,INTRDR)" - statement within
the DB2 Stored Procedure execution address space startup JCL (ssidSPAS or
any procname for WLM-managed address spaces). The Stored Procedure must
write the jobstream to this "anyname" file then. It can even read in the
jobstream from any JCL library before, if you provide a DD-statement there
for this library too.

I'm not that familiar with CICS, but DB2 V7+ provides even a dedicated and
very useful stored procedure called DSNACICS that can be used to invoke CICS
transactions and other things. This procedure is well documented in the DB2
z/OS Application Programming Guide

Cheers - Walter.

"Dad" <da********@gmail.com> schrieb im Newsbeitrag
news:11*********************@g43g2000cwa.googlegro ups.com...
Is it possible to invoke JCL or CICS from a stored procedure? I am
working on a integration project in which I need one system to invoke
another. The plan is to write data into tables in DB2 and then call
existing programs to process the data. We don't have CICS TS or
similar, so I need a way to trigger backend processing.

Nov 12 '05 #2

P: n/a
Dad
Walter, thank you for your reply. Do you happen to have a sample you
could send of a stored procedure calling JCL? Or will you direct me to
some documentation specific to this topic? I've searched through
developer guides at IBM.com and via google and have come up short.

Nov 12 '05 #3

P: n/a
Hi,

common samples of stored procedures are documented in the already mentioned
DB2 for z/OS Application Development Guide and executable samples are also
created during the DB2 installation process. All your desired procedure has
to do is to write the jobstream to a file which is associated with the JES
INTRDR within the DB2 stored procedure address space where it will be
executed then.

How your procedure writes to a file depends on the programming language you
use for writing it (PLI, COBOL, C, C++) and is documented in the affected
language's Programmer's Guide or Reference.

Manuals for DB2 for z/OS can be freely referenced or downloaded here
(depending on the version you will use):
http://www-3.ibm.com/software/data/d...0/v7books.html
http://www-3.ibm.com/software/data/d...0/v8books.html

Cheers - Walter SCHNEIDER.

"Dad" <da********@gmail.com> schrieb im Newsbeitrag
news:11*********************@o13g2000cwo.googlegro ups.com...
Walter, thank you for your reply. Do you happen to have a sample you
could send of a stored procedure calling JCL? Or will you direct me to
some documentation specific to this topic? I've searched through
developer guides at IBM.com and via google and have come up short.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.