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

Problem while running a rexx Db2 script thru JCL


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 8796
Location: Welsh Wales

PostPosted: Sat Jan 30, 2010 3:05 pm
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

Moderator Emeritus


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

PostPosted: Sat Jan 30, 2010 9:37 pm
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
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

Moderator Emeritus


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

PostPosted: Mon Feb 01, 2010 8:20 pm
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
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: 1281
Location: Belgium

PostPosted: Tue Feb 02, 2010 6:58 pm
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
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 02, 2010 7:50 pm
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: 1281
Location: Belgium

PostPosted: Tue Feb 02, 2010 8:09 pm
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
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

Moderator Emeritus


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

PostPosted: Tue Feb 02, 2010 9:57 pm
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
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

Moderator Emeritus


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

PostPosted: Wed Apr 28, 2010 8:21 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
Search our Forums:

Back to Top