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

SQL Code -904 in DB2 but in SPUFI it's working fine


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rinkubhat

New User


Joined: 13 Sep 2005
Posts: 35
Location: India

PostPosted: Wed Dec 13, 2006 12:59 pm
Reply with quote

I am getting SQL Code -904 in a particular para which is fetching values from two tables.I tried to run the same query through SPUFI and it is working.But while running the program I am getting -904.Ho to solve it?
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Wed Dec 13, 2006 1:42 pm
Reply with quote

Hi rinkubhat,
It says resource not available.
This means the table you are trying to retrieve data from is not available for READ.

As you are saying u can run query from SPUFI and its working fine.

Please try to check ur UTILID.

Sometimes when u are doing database insert/update operation and if ur job fails then UTILID for particular user gets stopped.

I dont know if this is the correct solution but u can give it a try.

Let me if it worked or not.


Thanks,
Rajen
Back to top
View user's profile Send private message
rinkubhat

New User


Joined: 13 Sep 2005
Posts: 35
Location: India

PostPosted: Wed Dec 13, 2006 2:17 pm
Reply with quote

HI,
Thanks for ur response ,Could u please clarify this UTILID???
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Wed Dec 13, 2006 2:37 pm
Reply with quote

Well.
Please read below.

UID - Specify User ID

The UID option allows you to specify the User ID attribute to be set for
the SYSLMOD file:

+------------------------------------------------------------------------+
| |
| UID=value |
| |
+------------------------------------------------------------------------+

where

value
A string of up to 8 alphanumeric characters that represents a user
name (such as TSO logon ID) or a numeric z/OS UNIX user id.

The above is taken from Mainframe help.

Usually when you insert/update records in table this UID would be attached to ur jcl and if ur job abends/fails then UID gets locked.

I dont know if you are using the same utility as we are using in our shop.

Usually you would get -904 when table is available.

Can you please clarify one thing.
The sql statement for which your job has abended, is it the first SQL statement of ur program?


Thanks,
Rajen.
Back to top
View user's profile Send private message
rinkubhat

New User


Joined: 13 Sep 2005
Posts: 35
Location: India

PostPosted: Wed Dec 13, 2006 2:53 pm
Reply with quote

Rajen,
Yep this is the first SQL of the program?
Whats important in that
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Wed Dec 13, 2006 3:05 pm
Reply with quote

Hi Rinku,
If this is the first SQL statement of the program then i guess its the same problem which i mentioned UID (Util ID).

Please try to goto DB2 primary menu and from there select DB2 commands option(should 7th or 8th option). There you can give start/stop utilid.

Thanks,
Rajen.
Back to top
View user's profile Send private message
rinkubhat

New User


Joined: 13 Sep 2005
Posts: 35
Location: India

PostPosted: Wed Dec 13, 2006 3:18 pm
Reply with quote

Rajen ,
this stuff which u are telling I had used earlier
but I dont exactly remember the commnad format
Can u help me with that
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Wed Dec 13, 2006 3:22 pm
Reply with quote

Hi,
First check status of your UID with below mentioned command.

-DISPLAY UTIL('RKPA')

then you can terminate your UID manually with below mentioned command.

-TERM UTIL(RKPA)


then using the first DISPLAY command check the status again and compare both the messages.

After that u can resubmit the job.

Let me know if it worked or not.

Thanks,
Rajen.
Back to top
View user's profile Send private message
rinkubhat

New User


Joined: 13 Sep 2005
Posts: 35
Location: India

PostPosted: Wed Dec 13, 2006 3:25 pm
Reply with quote

I get the following message when i try to run the above command

DSNU112I DA06 DSNUGDIS - NO AUTHORIZED UTILITY FOUND FOR UTILID = RKPA
DSN9022I DA06 DSNUGCCC '-DISPLAY UTIL' NORMAL COMPLETION
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Wed Dec 13, 2006 3:28 pm
Reply with quote

Please go ahead and run the job it should work now.

Let me know the result.

Thanks,
Rajen.
Back to top
View user's profile Send private message
rinkubhat

New User


Joined: 13 Sep 2005
Posts: 35
Location: India

PostPosted: Wed Dec 13, 2006 3:56 pm
Reply with quote

thanks fo ur help however it ddint work
seems to be some issue there with tables
Back to top
View user's profile Send private message
vijju123

New User


Joined: 13 Dec 2006
Posts: 2
Location: delhi

PostPosted: Tue Dec 19, 2006 3:13 am
Reply with quote

hai everybody i am new to this forum.i had read all the replies above.i am happy to see that.i will give my suggestion also..generally -904 is a abend with resource unavailble.may be you are trying to access the table which are being used by the other user.it depends up on the table isolation level also..so we have to drop the other user who is accessing it..that will be done by the production support people by request if you immediatly need the access to a particular table if you get these type of abend.....
Please correct me if i am wrong...
Back to top
View user's profile Send private message
sambasivarao

New User


Joined: 10 Jul 2006
Posts: 47
Location: Bangalore

PostPosted: Thu Dec 28, 2006 8:16 pm
Reply with quote

Hi All,

Today i also faced the same problem. After that i checked my SQL in SPUFI also.

Later i find that the problem is with SQL.

In SQL iam not joining the tables properly.

Finally i corrected my SQL with JOINS perfectly. Then SQL ran fine in SPUFI and in JCL also .

Could you please check once your SQL query. If you are using JOIN, please ensure that it is correct.

Please let me know if iam wrong.


Thanks and Regards,
Samba.
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue Jan 30, 2007 4:29 pm
Reply with quote

Can you paste the reason code.

One of the reason might me underlying datasets of the table might got migrated so, it says resource unavailable. Until the datasets are recalled you will face the problem.

Submit the job for every interval continous.
we cannot say specific time it will be recalled.

Hope it helps. If it not the reason please paste the reason code.

Regards,
Jr
Back to top
View user's profile Send private message
rrk_007

New User


Joined: 22 May 2007
Posts: 17
Location: Mumbai

PostPosted: Tue Feb 05, 2008 7:57 pm
Reply with quote

Do a Rebind. That may work. I faced this before.
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 -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
Search our Forums:

Back to Top