IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Check the table status through JCL


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sailaja cherla

New User


Joined: 08 Oct 2007
Posts: 13
Location: India

PostPosted: Mon Sep 08, 2008 9:58 am
Reply with quote

Hi,
Is it possible to check the DB2 table status through JCL?
If so please do let me know
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 08, 2008 1:38 pm
Reply with quote

What type of "status" you are looking for ?
Back to top
View user's profile Send private message
sailaja cherla

New User


Joined: 08 Oct 2007
Posts: 13
Location: India

PostPosted: Mon Sep 08, 2008 4:01 pm
Reply with quote

I need to check if the table is active or not. sometimes the regions are down, in such case I need to check if the region is up or not and depending on that I would like to proceed.
Back to top
View user's profile Send private message
sailaja cherla

New User


Joined: 08 Oct 2007
Posts: 13
Location: India

PostPosted: Tue Sep 09, 2008 4:05 pm
Reply with quote

Is it possible to check SQL Code through JCL.May be I can issue a select statement and check for SQL code of that statement. Is it possible?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Sep 09, 2008 4:14 pm
Reply with quote

Why not try it out and see the result ?
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Sep 09, 2008 5:45 pm
Reply with quote

yes you can execute SQL query thru jcl using IKJEFT01.
Back to top
View user's profile Send private message
sailaja cherla

New User


Joined: 08 Oct 2007
Posts: 13
Location: India

PostPosted: Tue Sep 09, 2008 5:54 pm
Reply with quote

What I want to know is how to check the SQL code of a DB2 statement through JCL
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Sep 15, 2008 7:40 pm
Reply with quote

Maybe you can execute the step:
Code:
//CHECKDB  EXEC  PGM=IKJEFT01
//SYSTSPRT DD    SYSOUT=*
//SYSPRINT DD    SYSOUT=*
//SYSOUT   DD    SYSOUT=*
//SYSTSIN  DD    *
 DSN SYSTEM(DB2T)
   -DIS DATABASE(databasename) SPACENAM(tablespacename)
 END

(on our site, each table is in its own tablespace)
Then check the return code:
Code:
//        IF (CHECKDB.RC = 0) THEN
//* all correct, can work with table
//        ELSE
//* something wrong with access to table
//        ENDIF

Does it help you ??
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 15, 2008 10:16 pm
Reply with quote

Hello,

Quote:
What I want to know is how to check the SQL code of a DB2 statement through JCL
Jobs that require the database be "up" should be scheduled as such. If the database is not up, the job should not be submitted.

There should be no reason to check if the database is "up".
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Sep 16, 2008 8:11 am
Reply with quote

Hi,

I believe database up or down should be a concern of system programmers , as an application prgrammer I fail to recall any such check if I've ever seen in my system. Well, if my JOB is fails in Production due to this, I would be happy to point "that" to system programmers right away..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Job completes in JES, but the status ... IBM Tools 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top