|
View previous topic :: View next topic
|
| Author |
Message |
AJAYREDDY
New User
Joined: 17 Feb 2007 Posts: 52 Location: USA
|
|
|
|
As I am New to IMS I need some information on getting segments based on AND and OR condition. I have SSA declaration as below.
| Code: |
01 R300-SSA.
02 FILLER PIC X(8) VALUE 'RR300000'.
02 RR300-CMNDS PIC X(4) VALUE '*---'.
02 FILLER PIC X(9) VALUE '(RR300SEQ'.
02 RR300-OPER PIC XX VALUE 'EQ'.
02 RR300-SSA-KEY PIC X(22).
02 FILLER PIC X VALUE ')'.
|
Can anyone please let me know how to put AND and OR condition if I do not know the Key (As we put in DB2 SQL WHERE condition) ?
For example I want to READ records with RR300-FRB-IND as well as RR300-BLN. But these are not Key Fields. How should I modify above layout ? |
|
| Back to top |
|
 |
Douglas Wilder
Active User
.jpg)
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Use asterisk * or ampersand & to indicate logical AND. Use plus sign or vertical bar to indicate a logical OR.
| Code: |
01 R300-SSA.
02 FILLER PIC X(8) VALUE 'RR300000'.
02 RR300-CMNDS PIC X(4) VALUE '*---'.
02 FILLER PIC X(9) VALUE '(RR300SEQ'.
02 RR300-OPER PIC XX VALUE 'EQ'.
02 RR300-SSA-KEY PIC X(22).
02 RR300-CMNDS PIC X(1) VALUE '&'.
02 FILLER PIC X(9) VALUE '(RR300XXX'.
02 RR300-OPER PIC XX VALUE 'EQ'.
02 RR300-SSA-FLD2 PIC X(22).
02 FILLER PIC X VALUE ')'. |
|
|
| Back to top |
|
 |
Douglas Wilder
Active User
.jpg)
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
A few corrections to my previous post:
| Code: |
01 R300-SSA.
02 FILLER PIC X(8) VALUE 'RR300000'.
02 RR300-CMNDS PIC X(4) VALUE '*---'.
02 FILLER PIC X(9) VALUE '(RR300FRB'.
02 RR300-OPER PIC XX VALUE 'EQ'.
02 RR300-SSA-FRB PIC X(22) VALUE SPACES.
02 FILLER PIC X(1) VALUE '&'.
02 FILLER PIC X(8) VALUE 'RR300BLN'.
02 RR300-OPER PIC XX VALUE 'EQ'.
02 RR300-SSA-BLN PIC X(22) VALUE SPACES.
02 FILLER PIC X VALUE ')'. |
|
|
| Back to top |
|
 |
|
|