View previous topic :: View next topic
|
Author |
Message |
Megalai
New User
Joined: 13 Jan 2006 Posts: 16
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
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 |
|
|
bonniem
New User
Joined: 09 Aug 2005 Posts: 67
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
Megalai
New User
Joined: 13 Jan 2006 Posts: 16
|
|
|
|
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 |
|
|
bonniem
New User
Joined: 09 Aug 2005 Posts: 67
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
|