View previous topic :: View next topic
|
Author |
Message |
kalarani
New User
Joined: 21 Nov 2006 Posts: 6 Location: chennai
|
|
|
|
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 |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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 |
|
|
kalarani
New User
Joined: 21 Nov 2006 Posts: 6 Location: chennai
|
|
|
|
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 |
|
|
|