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
 
SQL Code -904 in DB2 but in SPUFI it's working fine

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: SQL Code -904 in DB2 but in SPUFI it's working fine
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject:
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    Post subject: Re: SQL Code -904
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    Post subject: Re: SQL Code -904
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
No new posts REXX LISTDSI () SMSINFO is not working upendrasri CLIST & REXX 4 Fri Nov 17, 2017 11:33 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm

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