View previous topic :: View next topic |
Author |
Message |
mainframemouli Beginner
Joined: 23 Feb 2005 Posts: 87 Topics: 33
|
Posted: Thu Feb 24, 2005 7:17 am Post subject: Passing of Keys in fetching Record in Datacomm |
|
|
example
KEY DATA NAME POSITIONS LNG
PPKK1 PPK01-KR-NO 037-040 4
PPK01-KR-SUFFIX 041-043 3
PPKK2 PPK01-PO-NO 051-054 4
PPK01-KR-NO 037-040 4
PPK01-KR-SUFFIX 041-043 3
In PPKK2
if PPK01-KR-NO and PPK01-KR-SUFFIX doesn't have proper values and
PPK01-PO-NO is having the value will it be fetching the correct record???????
can anyone pls calrify this. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Feb 24, 2005 8:50 am Post subject: |
|
|
Mainframemouli,
You need to show us your SELECT statement that is used to fetch the rows from the table.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
mainframemouli Beginner
Joined: 23 Feb 2005 Posts: 87 Topics: 33
|
Posted: Fri Feb 25, 2005 4:54 am Post subject: |
|
|
Mr.Kolusu , This question is for Datacomm not for DB2 any how i will give the statements before the DBNTRY call
MOVE SPACE TO APK-FOUND-SWT.
MOVE REDKL TO DB-CMD-PPK.
MOVE 'PPK' TO DB-FILE-PPK.
MOVE 'PPKK2' TO DB-KEYNA-PPK.
MOVE SPACE TO DB-ELEMENTS-PPK.
MOVE 'PPK00 APK01 APK02' TO DB-ELEMENTS-PPK.
MOVE HIGH-VALUES TO DB-PPKK2.
MOVE POH-PO-NBR TO DB-PPKK2-PO-NO.
Now PPKK2 has three Keys with if the values in two keys are not having proper value and the Third one is having the proper value will it fetch a correct record????????????????/ |
|
Back to top |
|
 |
bstillwa Beginner
Joined: 01 Nov 2004 Posts: 23 Topics: 6 Location: NJ
|
Posted: Fri Feb 25, 2005 8:22 am Post subject: |
|
|
This depends upon the sequence of the key fields.
If key PPKK2 consists of the following fields in this stated sequence (which is not clear in the "example"):
PPK01-PO-NO
KR-NO
KR-SUFFIX
Since high values were moved to the key and
since the command is "read key less than or equal to" then
any record with key field equal to "POH-PO-NBR" and the other key fields less than or equal to high values will be returned. _________________ Bev. |
|
Back to top |
|
 |
bstillwa Beginner
Joined: 01 Nov 2004 Posts: 23 Topics: 6 Location: NJ
|
Posted: Fri Feb 25, 2005 8:25 am Post subject: |
|
|
A clarification:
any record with a key field LESS THAN OR equal to "POH-PO-NBR" and the other key fields less than or equal to high values will be returned. _________________ Bev. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Feb 25, 2005 8:29 am Post subject: |
|
|
Quote: |
Mr.Kolusu , This question is for Datacomm not for DB2 any how i will give the statements before the DBNTRY call
|
mainframemouli,
A lot of guesswork can be avoided if you have posted detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
mainframemouli Beginner
Joined: 23 Feb 2005 Posts: 87 Topics: 33
|
Posted: Fri Feb 25, 2005 8:59 am Post subject: |
|
|
Mr.Kolusu i will agree with you , i might have posted with more clarity.
i will stick to what u have said.
Yes its fetching the record for the corresponding POH-PO-NBR as they said. |
|
Back to top |
|
 |
|
|