Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Check the table status through JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Check the table status through JCL
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

Senior Member


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

PostPosted: Mon Sep 08, 2008 1:38 pm    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Sep 09, 2008 4:14 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1243
Location: Israel

PostPosted: Mon Sep 15, 2008 7:40 pm    Post subject: Reply to: Check the table status through JCL
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

Site Director


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

PostPosted: Mon Sep 15, 2008 10:16 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Sep 16, 2008 8:11 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us