Home > Ask the Data Center Experts > CICS Questions & Answers > Submitting a batch job from CICS
Ask The Data Center Expert: Questions & Answers
EMAIL THIS

Submitting a batch job from CICS

Robert Crawford EXPERT RESPONSE FROM: Robert Crawford

Pose a Question
Other Data Center Categories
Meet all Data Center Experts
Become an Expert for this site


IT infrastructure news
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 18 September 2007
How do you submit a batch job to JES from CICS?

>
There are a couple of ways to submit jobs from CICS. The easiest is through CICS' spool interface commands. Introduced in CICS/ESA 3.1 (the first version 3), these commands allow you to read and write directly to the JES spool. The general command sequence would be:

    EXEC CICS SPOOLOPEN
    EXEC CICS SPOOLWRITE
    EXEC CICS SPOOLCLOSE

You tell CICS to submit the JCL by coding USERID('INTRDR') on the SPOOLOPEN command. In addition, you should not code NODE('*'), but include a specific node or NODE('LOCAL') if the job is to run local system. You must also be sure you specify the correct output class for the standards at your shop. Look in the Application Programming Reference for details about how the commands work.

Alternatively, you can use an extrapartiion transient data queue (TDQ). The JCL or definition of the TDQ should point to the correct SYSOUT class and an internal reader. Then your program writes the JCL statements to the queue and then closes it. Note the job will not be submitted until the queue is closed. You will also need to use serialization techniques to prevent concurrent tasks from interleaving their JCL as they write.

The advantage of the spool commands is each task gets its own file so you don't have to worry about interleaving the JCL from two tasks. You also avoid closing and re-opening the TDQ each time.

Either way you choose you should be careful to arrange things so the batch jobs get proper security credentials. Certain attributes (e.g. inheritance) might give the batch jobs the same access authority as CICS, which could be bad depending on how much you trust your programmers. You must always be sure to put a slash-star card ("/*") at the end of the job so it will be automatically submitted.


BROWSE BY TAG
CICS,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
CICS
Which MQ Queue is related with which CICS transaction?
Can a program use IXLLIST macros in CICS?
VSAM files in CICS -- Batch report help
Reading VSAM data from different LPARs
Finding executed statements in CICS
Automating FTP transfers to AIX
FTP a dataset from MVS to Linux
Mainframe FTP - A simple check
Failed arithmetic operations on CICS programs written in C
Does replicating DB2 tables into CICS tables affect CPU usage?

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Building Green Data Centers
HomeNewsTopicsITKnowledge ExchangeTipsBlogsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts