dbTalk Databases Forums  

JCL to start DB2

ibm.software.db2.mvs ibm.software.db2.mvs


Discuss JCL to start DB2 in the ibm.software.db2.mvs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
arens@de.ibm.com
 
Posts: n/a

Default JCL to start DB2 - 08-07-2009 , 02:29 AM






Hi All,

I want to start a DB2 subsystem (v8 and v9) via JCL. For this, I currently have the following step to start the DB2 subsystem.

//DB2RSTRT EXEC PGM=IKJEFT01
//STEPLIB DD DISP=SHR,DSN=...
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DBxx)
-START DB2
END
/*


This works in case DB2 is already started (the log says that the subsystem is already running). But when the subsystem is stopped, it does not work, giving the following error message. It seems that DSN SYSTEM is used to connect to the DB2. That's why it is working if the subsystem is already running.

READY
DSN SYSTEM(DBxx)
DSNE100I DBxx NOT OPERATIONAL, RETRY COUNT IS ZERO
READY
-START DB2
IKJ56621I INVALID COMMAND NAME SYNTAX
READY
END


So how can I start a DB2 subsystem without using the DSN SYSTEM(...) command?

Regards

Reply With Quote
  #2  
Old   
momi.sabag@gmail.com
 
Posts: n/a

Default Re: JCL to start DB2 - 08-07-2009 , 03:35 AM






Hi

Yep, if db2 is not started, you can't use the dsn command processor.
You will need your job to issue a operator command - start db2
you will need some program that allows you to issue such commands,
you can also write a rexx that issues commands to the console

Reply With Quote
  #3  
Old   
Jan Kowalski
 
Posts: n/a

Default Re: JCL to start DB2 - 08-19-2009 , 06:10 AM



Quote:
So how can I start a DB2 subsystem without using the DSN SYSTEM(...) command?

I hope this should work.

//DB2START JOB MSGCLASS=A,CLASS=A
//*************************************************
//* *
//* START DB2 - JUST SUBMIT THIS JOB *
//* *
//*************************************************
//*
//*
//CMDS COMMAND '-DSN START
DB2'
//WAIT EXEC PGM=IEFBR14

Regards,
Roman G.

Reply With Quote
  #4  
Old   
Arens
 
Posts: n/a

Default Re: JCL to start DB2 - 09-08-2009 , 07:11 AM



Hi momi,

thanks for your reply. I needed a bit to figure out how to issue operator commands from within JCL. START DB2 works fine now

Greetings

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.