MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Passing of Keys in fetching Record in Datacomm

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Thu Feb 24, 2005 7:17 am    Post subject: Passing of Keys in fetching Record in Datacomm Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Feb 24, 2005 8:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Fri Feb 25, 2005 4:54 am    Post subject: Reply with quote

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
View user's profile Send private message
bstillwa
Beginner


Joined: 01 Nov 2004
Posts: 23
Topics: 6
Location: NJ

PostPosted: Fri Feb 25, 2005 8:22 am    Post subject: Reply with quote

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
View user's profile Send private message
bstillwa
Beginner


Joined: 01 Nov 2004
Posts: 23
Topics: 6
Location: NJ

PostPosted: Fri Feb 25, 2005 8:25 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Feb 25, 2005 8:29 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Fri Feb 25, 2005 8:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group