View previous topic :: View next topic
|
Author |
Message |
sonu_winks
New User
Joined: 23 Nov 2005 Posts: 23
|
|
|
|
Hi All,
I am doing a simple GU call using a partial key but I am not getting the desired O/p.
ex;
Table looks like ;
MO# LN# SHIP#
CM000232 01 00
CM000232 02 00
FZ000482 01 00
FZ000483 01 00
FZ000484 01 00
FZ000485 01 00
FZ000486 01 00
FZ000487 01 00
:
:
I have passed MO# CM000232 and going for a GU using '=>' .I expected the call to return 'CM000232 01 00 " but I got 'FZ000487 01 00'.
I coded it like ;
MOVE LOW-VALUES TO WS-TABLE-KEY.
MOVE WS-HOLD-MO TO WS-MO-NUMBER. (value : CM000232)
MOVE WS-TABLE-KEY TO TAROOT-SSA-KEY.
MOVE '=>' TO TAROOT-SSA-OPER.
DISPLAY 'SSA-OETAROOT' SSA-OETAROOT
CALL 'CBLTDLI' USING GU
TA-PCB-NAME-CTRL
OETAROOT
SSA-OETAROOT.
What could be the reason..
Thank you,
Me. |
|
Back to top |
|
|
qzphc5
New User
Joined: 24 May 2003 Posts: 3 Location: USA
|
|
|
|
Code a Boolean SSA and try to read all the seg occurenaces in the Key ranges you ar expecting to read |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Please use code tags and show us the SSA definition. |
|
Back to top |
|
|
sonu_winks
New User
Joined: 23 Nov 2005 Posts: 23
|
|
|
|
SSA is defined as ;
Code: |
05 FILLER PIC X(8) VALUE 'OETAROOT'.
05 TAROOT-SSA-AST PIC X VALUE '*'.
05 TAROOT-SSA-CC1 PIC X VALUE '-'.
05 TAROOT-SSA-CC2 PIC X VALUE '-'.
05 TAROOT-SSA-QUAL PIC X VALUE '('.
05 FILLER PIC X(8) VALUE 'TABKEY'.
05 TAROOT-SSA-OPER PIC XX VALUE ' ='.
05 TAROOT-SSA-KEY PIC X(24).
05 FILLER PIC X VALUE ')'. |
Value passed :
Code: |
OETAROOT*--(TABKEY =>CM000232 ) |
|
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Try changing your GU to a qualified GN. And, it is not a table - DB2 has tables - IMS has databases. |
|
Back to top |
|
|
sonu_winks
New User
Joined: 23 Nov 2005 Posts: 23
|
|
|
|
GN was not working... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Do NOT post "it didn't work. . . The only answer we can offer to that is "Fix it".
You need to take the time to clearly explain what you changed and what happened.
If you post code as part of your explanation, use the "Code" tag as this greatly improves readability. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Do not use a > than - use a GN (equal) with a fully qualified SSA and post your code. Dick is correct - we can only help if we know what the BUSINESS REQ is and what you plan to do to resolve it. |
|
Back to top |
|
|
Lavansekar247
New User
Joined: 09 Jun 2009 Posts: 5 Location: Chennai
|
|
|
|
Hello,
By looking at your problem statement, appears the GU call retrieves the last occurence for the qualified SSA. But you are expecting the first occurence as per your example.
I have few questions,
1. When you issue GU call with SSA(stated above), the call status was success, but when you validate that was not the one which you have expected. I mean the last occurence was there in IO area rather than the first occurence. Is this correct?
2. Did you get a chance to see how the database organized, by means of data stored in Database. Has DBD says the storing latest data at the top other way, hence you got the last occurrence as first.
3. Can you share WS-TABLE-KEY declaration. Did you ever tried to pass Spaces into WS-TABLE-KEY rather than low-values.
This might not resolve the issue but helps to understand the real problem. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Please look at the DBD and give us the structure. Is it HDAM or HIDAM? |
|
Back to top |
|
|
|