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

In which SYSIBM Table Information abt Primary key stored


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Megalai

New User


Joined: 13 Jan 2006
Posts: 16

PostPosted: Wed Feb 15, 2006 11:47 am
Reply with quote

Hi friends,

Please answer these Questions.

1. In Cobol+Db2 Program i am using Cursors. In this i am having 10,000 records. But using cursor i would like to retrieve first 200 rows and next from 201 to 400 rows so on....

What is the logic for this?

2. In which SYSIBM Table Information abt Primary key is presented? That is which column contains Primary key?

3. How will u ensure that u have done the coding in a QUALITY basis?

4. In XPED how will u prepare ur Program? how to answer for this?
That is what all are the steps i have to mention for this?

Thanks and Regards,
me.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Feb 15, 2006 12:02 pm
Reply with quote

Quote:
2. In which SYSIBM Table Information abt Primary key is presented? That is which column contains Primary key?

SYSIBM.SYSKEYS

Regards,

Priyesh.
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Wed Feb 15, 2006 2:12 pm
Reply with quote

For Question no 1, I have understood that you can use FETCH verb to retrieve the first 200 recordds and so on.
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Wed Feb 15, 2006 2:52 pm
Reply with quote

Quote:
In which SYSIBM Table Information abt Primary key is presented? That is which column contains Primary key?


You can get this from SYSCOLUMNS also. Just look for fields which have KEYSEQ <> 0.

Quote:
In XPED how will u prepare ur Program? how to answer for this?
That is what all are the steps i have to mention for this?


You have to use XPED yes in the compilation job so that DDIO files are created. Then in XPED give the load libraries, the dsnload etc if it is a Db2 test, resli, psblib etc if it is IMS program, give the files used in the jcl. I guess that much basic info is enough.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Feb 15, 2006 5:31 pm
Reply with quote

Quote:
1. In Cobol+Db2 Program i am using Cursors. In this i am having 10,000 records. But using cursor i would like to retrieve first 200 rows and next from 201 to 400 rows so on....


Adding to Amitava Chowdhury.. u can use the Between option with primary key such that to retrive the range of records.

Quote:
3. How will u ensure that u have done the coding in a QUALITY basis?


I think u should come accross some of the quality metrics and then only v can know. simply without refering to the quality metrics it seems dificult to know.
Back to top
View user's profile Send private message
Megalai

New User


Joined: 13 Jan 2006
Posts: 16

PostPosted: Wed Feb 15, 2006 5:51 pm
Reply with quote

Hi Friends,

Thanks a lot for ur information. It is helpful for me.

Hi Kamarudeen,

Thanks for ur Reply. So i have to declare more no Cursors to fetch the subsequent records? U meant to say that i have to declare the Cursor as foll.

Exec Sql
Declare C1 Cursor for select Ename from EMP
where Accno between 100 and 200
End-exec.


Please let me know reg this.

Thanks and REgards,
Megalai.
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Fri Feb 17, 2006 10:58 am
Reply with quote

Hi,

between <low> and <high>

Use the between fields as variables and then open the cursor with the corresponding values moved to the low and high value of the keys.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Mon Feb 20, 2006 3:30 pm
Reply with quote

Hi,

S i meant in that way only. Hope U catched my point. If it works well let us know ur feedback of ur result
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top