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

Issue in IMS GU call using partial key


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Fri Jul 10, 2009 9:20 pm
Reply with quote

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.. icon_eek.gif

Thank you,
Me.
Back to top
View user's profile Send private message
qzphc5

New User


Joined: 24 May 2003
Posts: 3
Location: USA

PostPosted: Sat Jul 11, 2009 1:16 am
Reply with quote

Code a Boolean SSA and try to read all the seg occurenaces in the Key ranges you ar expecting to read
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Sat Jul 11, 2009 1:23 am
Reply with quote

Please use code tags and show us the SSA definition.
Back to top
View user's profile Send private message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Sun Jul 12, 2009 11:42 am
Reply with quote

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

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Mon Jul 13, 2009 8:04 pm
Reply with quote

Try changing your GU to a qualified GN. And, it is not a table - DB2 has tables - IMS has databases.
Back to top
View user's profile Send private message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Tue Jul 14, 2009 9:51 pm
Reply with quote

GN was not working... icon_exclaim.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 15, 2009 12:34 am
Reply with quote

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

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Jul 15, 2009 4:37 am
Reply with quote

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

New User


Joined: 09 Jun 2009
Posts: 5
Location: Chennai

PostPosted: Wed Jul 15, 2009 4:13 pm
Reply with quote

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

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Jul 15, 2009 5:53 pm
Reply with quote

Please look at the DBD and give us the structure. Is it HDAM or HIDAM?
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Call program, directly from panel CLIST & REXX 9
No new posts Batch call online program, EXCI task ... CICS 3
Search our Forums:

Back to Top