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

How to Read records in back words from table using Cursor


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
varabandi

New User


Joined: 07 Mar 2005
Posts: 2

PostPosted: Mon Jun 06, 2005 10:19 am
Reply with quote

I have few quetions on DB2. please answer those...


1. How to read records from table in Back words Using Cursor.

2. How to solve -818 .

3. How Optimizer works? What does it do?

4. how to solve soc-7 in effctive way if it is production?
Back to top
View user's profile Send private message
laxmi

New User


Joined: 24 May 2005
Posts: 9

PostPosted: Mon Jun 06, 2005 3:19 pm
Reply with quote

1) by using scrollable cursors we can read backward and forward
the option is ABSOLUTELY N so that it fetches N records from the beginning
RELATIVELY N it fetches N records from the last record
i think it is sufficient if u have any doubts let me know
Back to top
View user's profile Send private message
asr1983

New User


Joined: 31 May 2005
Posts: 11

PostPosted: Mon Jun 06, 2005 5:40 pm
Reply with quote

Hi varabandi,

Sql code -818 occurs because of the timestamp mismatch between pre-compiler and bind.

Solution is to pre-compile and bind it again

Let me know if any other solutions.

Regards,
Ram
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 2:56 pm
Reply with quote

hi frnd,
S0C7 is the common error in mainframe tech.
here is the solution to solve it:

>>>Basically you need to correcting the offending data. Many times the reason for SOC7 is an un-initialized numeric item.

>>>Examine that possibility first. Many installations provide you a dump for run time abend?s ( it can be generated also
by calling some subroutines or OS services thru assembly language).

>>> Examine the compilation output XREF listing to get the verb and the line number of the source code at this offset.

>>> Then you can look at the source code to find the bug. To get capture the runtime dumps, you will have to define some datasets (SYSABOUT etc ) in the JCL.

>>>If none of these are helpful, use judgement and DISPLAY to localize the source of error.

>>>Some installation might have batch program debugging tools. Use them.

hope enough
Back to top
View user's profile Send private message
tam

New User


Joined: 02 Nov 2005
Posts: 12
Location: zz

PostPosted: Mon Nov 07, 2005 3:33 pm
Reply with quote

DB2 optimizer selects the best access paths for executing the Sql Statements. Whenever a Dynamic SQl statement is issued the DB2 optimizer reads the system catalog tables to review the available indexes, the size of each table, the characteristics of the column, and other information to select the bets access path for executing the query.[/b]
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 Error to read log with rexx CLIST & REXX 11
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top