Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem while running a rexx Db2 script thru JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
mannepalli

New User


Joined: 05 May 2008
Posts: 9
Location: Bangalore

PostPosted: Sat Jan 30, 2010 1:28 pm    Post subject: Problem while running a rexx Db2 script thru JCL
Reply with quote

Hello Every body,


I'm facing a problem. Please help me out ...

Problem: i have a rexx + db2 program . i can able to run/execute this program using tso exec command.

But when i'm running the same program thru JCL its giving me Db2 substem not found sqlcode = - 924

I'm thinking that ... while running in tso background its system default libraries is different and while running thru JCl system default libraries is different.

If my assumption is correct what is the order for system libraries Tso and JCL.

If my assumption is wrong Please give correct solution ..

Thanks alot .. .
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: Sat Jan 30, 2010 3:05 pm    Post subject:
Reply with quote

Unfortunately psychic days are not permitted on weekends.

Without seeing the JCL that you try to execute, and the associated output, we know nothing, so can not possibly help you.

However, something to ponder. Does the program that you attempt to execute live in one of the ISPLLIB concatenations.
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: Sat Jan 30, 2010 9:37 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

Suggest you talk with your dba for the specifics for your system.

Or simply look at some other process that is working and clone this.
Back to top
View user's profile Send private message
mannepalli

New User


Joined: 05 May 2008
Posts: 9
Location: Bangalore

PostPosted: Mon Feb 01, 2010 12:04 pm    Post subject: Reply to: Problem while running a rexx Db2 script thru JCL
Reply with quote

Hi .. Let me explain bit clear ,.

If i give Tso ex 'U639038.EXEC.REXX(DB2REXX)' ex
in ISPF pannel .. its running my Program and giving correct results and

When i'm executing the same program thru jcl i'm facing the problem.
Below i'm giving the JCL.

//STEP4 EXEC PGM=IKJEFT01,PARM='%DB2REXX'
//SYSEXEC DD DSN=U639038.EXEC.REXX,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD DUMMY
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 Feb 01, 2010 8:20 pm    Post subject:
Reply with quote

Hello,

What did the dba tell you?

Why have you not yet determined which subsystem is being used rather than the one you want?

All of the answers are on your system. We do not have access to your system. . .

Unfortunately, most of the work in getting help from the forum is on the requestor. . . We can only help with what you provide (as Expat mentioned, not every day is psychic day).

Do not let this discourage you - most of us had to learn how to ask for technical help icon_smile.gif
Back to top
View user's profile Send private message
mannepalli

New User


Joined: 05 May 2008
Posts: 9
Location: Bangalore

PostPosted: Tue Feb 02, 2010 4:16 pm    Post subject: Reply to: Problem while running a rexx Db2 script thru JCL
Reply with quote

Heloo dick scherrer,

I dont think its DBA problem .. .

Because i'm able to access the same Substem by running the program in Tso background.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Tue Feb 02, 2010 6:58 pm    Post subject:
Reply with quote

-924 Connection to DB2 has failed because of an unexpected internal error, identified by the 'reason-code'.

So what's the reason code ?
Back to top
View user's profile Send private message
mannepalli

New User


Joined: 05 May 2008
Posts: 9
Location: Bangalore

PostPosted: Tue Feb 02, 2010 7:20 pm    Post subject: Reply to: Problem while running a rexx Db2 script thru JCL
Reply with quote

HI .. .


Sql CA after submitting the JCL.

SQLCA ::
SQLSTATE=58006
SQLWARN = , , , , , , , , , ,
Sqlerrd= 0,0,0,0,0,0'
SQLERRP =DSNTZALI
SQLERRMC =00000002 00000008 00F30002
SQLCODE =-924

My main doubt is, Same program is running perfectly
if i give Tso ex'dataset name'
why its erroring when i run the same program thru JCL .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Feb 02, 2010 7:50 pm    Post subject:
Reply with quote

Quote:
My main doubt is, Same program is running perfectly
if i give Tso ex'dataset name'
why its erroring when i run the same program thru JCL .
Contact your site support group. Since a number of data sets are allocated during the sign on processing for TSO, obviously you are missing one or more of these allocated files in your batch job. Since we do not know the environment at your site, only your site support group can tell you which files you need to add to your batch job to get it working.

The more important question is why on earth would you expect something to run just the same in batch as in TSO? They are very different environments and there are things you can do in your TSO session you cannot do in batch and vice versa.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Tue Feb 02, 2010 8:09 pm    Post subject:
Reply with quote

00F30002
Explanation:
The requested DB2 subsystem, as specified by the subsystem name, is not active. The option to notify the requester, either via an ECB post or a
SEND/MODIFY MVS command, is accepted.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Tue Feb 02, 2010 8:33 pm    Post subject:
Reply with quote

Srinivas,
One option based on my prev exp is to use proper CLASS parameter in which your DB2 subsystem is active. Use the job card from some existing jobs which are using DB2 and running fine.
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: Tue Feb 02, 2010 9:57 pm    Post subject:
Reply with quote

Hello,

Quote:
I dont think its DBA problem .. .
Probably not - it is almost surely your problem.

The DBA can however show you what you have done wrong. . .
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Wed Apr 28, 2010 2:37 pm    Post subject:
Reply with quote

Hi All,

I was also facing similar issue where my REXX/DB2 code was working fine on line(TSO EXEC) while it was failing with -924 DB2 code in batch. When I changed the CLASS as (CLASS=DB2TSTD) and it worked for me. This class might be site-specific.
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: Wed Apr 28, 2010 8:21 pm    Post subject:
Reply with quote

Hello,

Quote:
This class might be site-specific.
Yes, it is site-specific.

As with your situation, the original problem was that the batch job either pointed to the wrong subsystem or no subsystem. . . We just never received any followup on the original issue icon_sad.gif
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us