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

Partial key in SSA


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

New User


Joined: 21 Nov 2006
Posts: 6
Location: chennai

PostPosted: Sun Aug 31, 2008 1:54 pm
Reply with quote

The given database has two fields as keys (say fld1,fld2), but to access the database only the fld1 is available(say 123). How can I use GN/GU calls to retrieve the set of segments matching the data for fld1 with SSA.

01 SSA-1.
03 SEGMENT-NAME PIC X(8) VALUE 'SEGMENTA'.
03 COMMAND-CODE PIC X(2) VALUE '*-'.
03 BEGIN-QUALIFY PIC X(1) VALUE '('.
03 KEYNAME PIC X(8) VALUE 'AKEY '.
03 OPERATOR PIC X(2) VALUE ' ='.
03 KEY-VALUE.
05 KEY-FLD1 PIC 9(3).
05 KEY-FLD2 PIC X(3).
03 END-QUALIFY PIC X(1) VALUE ')'.

Whether the below options work
1)Can I move 'low values' to the Key-Fld2 and use the above SSA to retrieve the segments in Key-Fld1 for all the values in Key-Fld2.

eg:values in database

Key-Fld1,Key-Fld2
123,A
123,A1
123,A2

My expected result is to retrieve all the 3 segments.

2) Can I change the SSA to below layout
03 BEGIN-QUALIFY PIC X(1) VALUE '('.
03 KEY-VALUE-MIN.
05 KEY-FLD1-N PIC 9(3).
05 KEY-FLD2-N PIC X(3).
03 OPERATOR1 PIC X(2) VALUE 'GE'.
03 KEYNAME PIC X(8) VALUE 'AKEY '.
03 OPERATOR2 PIC X(2) VALUE 'LE'.
03 KEY-VALUE-MAX.
05 KEY-FLD1-x PIC 9(3).
05 KEY-FLD2-x PIC X(3).
03 END-QUALIFY PIC X(1) VALUE ')'.



with KEY-FLD1-N and KEY-FLD1-X having same value(say 123) but KEY-FLD2-N and KEY-FLD2-X values are low-values and high values respectively.
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 Sep 01, 2008 8:03 am
Reply with quote

Are you saying that you want to retrieve ALL segments with the high order value of 123? The secondary key field does not matter? If that is true, then you will want to code a boolean ssa. Let us know and we will help.
Back to top
View user's profile Send private message
kalarani

New User


Joined: 21 Nov 2006
Posts: 6
Location: chennai

PostPosted: Mon Sep 01, 2008 8:59 am
Reply with quote

Yes you are right,
I would like to retrieve ALL segments if i give key-fld1=123
Please suggest me how to write a boolean SSA.
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 Find the occurrence of Key Field (Par... DFSORT/ICETOOL 6
No new posts EIBRESP=16 and EIBRESP2=25 while doi... CICS 2
No new posts Partial color change of a field in CI... CICS 5
No new posts Read VSAM file based on a partial key JCL & VSAM 6
No new posts Partial Distinct and converting rows ... DB2 10
Search our Forums:

Back to Top