Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


Submit a JCL thru Cobol

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL
  View previous topic :: View next topic  
Author Message
Sarthak
Guest





PostPosted: Sat Feb 25, 2006 4:54 pm    Post subject: Submit a JCL thru Cobol Reply with quote

Hi,

Can anyone give the code for submitting a JCL thru Cobol program?
Back to top

srinivas
Member


Joined: 08 Feb 2006
Posts: 9
Location: Bangalore

PostPosted: Tue May 30, 2006 2:46 pm    Post subject: Code for submitting jcl thru cobol Reply with quote

Hi,

Define a file in your cobol prog as below.

File-control.
Select file1 assign to dd1.

File section.
FD file1.

01 cobol-rec.
05 rec1 pic x(80).

procedure division.
para1.
Move '\\jobname job time,notify.....' to cobol-rec.
write cobol-rec.
move '\\step01 exec pgm=xxxx.....' to cobol-rec.
write cobol-rec.
Move '\\sample dd dsn=yyy.zzzzz...' to cobol-rec.
write cobol-rec.



After writing cobol program.
In JCL give dd1 as below.

//dd1 dd sysout=(INTRDR,*)

Pls try it and let me the know the result.

Regards,

Srinivas.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Juan
Member


Joined: 29 Jun 2006
Posts: 9

PostPosted: Thu Jun 29, 2006 4:01 pm    Post subject: Reply with quote

Please do NOT do this.

It is bad for so many reasons, change control, audit, Operastions management, job re-runs...

Can't think of any reason why this is a good idea. In fact have worked at places where doing this would get you fired.

If you don't have a job scheduler - which is the preffered method then just jobchain to the previous step by putting a Gener to the interal reader as the last step.

Whay are you trying to link the jobs like this ?
Back to top
View user's profile Send private message
Krishna
Site Admin


Joined: 27 Jan 2006
Posts: 929

PostPosted: Thu Dec 21, 2006 3:00 pm    Post subject: submit job from a job Reply with quote

To give more clarity on submitting job from different job


Code:
//**********************************************************************
//**************THIS IS A ROUTINE WHICH CALLS ANOTHER JCL ***           
//**********************************************************************
//* STEP02 : RE-SUBMIT THE JCL //***************************************
//STEP02  EXEC PGM=IEBGENER                                             
//SYSTSPRT  DD SYSOUT=*                                                 
//SYSPRINT  DD SYSOUT=*                                                 
//SYSUT1   DD DSN=DXX.XXXX.XXXX.JCLLIB(AUTO),DISP=SHR             
//SYSUT2   DD SYSOUT=(A,INTRDR)                                         
//SYSIN      DD DUMMY                                                   
//***********************************************************           





Regards,
Krishna
admin - http://www.ibmmainframeguru.com
http://www.geocities.com/srcsinc
http://www.jacharya.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts pls give me the answers for the following interview quesions 10 abcdef1234 9562 Wed Apr 21, 2010 10:06 am
phanindra View latest post
No new posts In cics what is new copy.please give me a example. 2 mainframe5 4525 Fri Mar 06, 2009 1:13 pm
kapil agarwal View latest post
No new posts give me a code to reverse a COBOL string. 2 mainframe5 6249 Sat Feb 16, 2008 4:14 am
DavidatK View latest post
No new posts pls give me answers these are may help for jobhunters.. 1 abcdef1234 3643 Sat Sep 15, 2007 3:30 am
DavidatK View latest post
No new posts CICs 5 vidhya 6266 Fri Nov 17, 2006 12:13 pm
hari.paramasivam View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB