Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get Segments with AND and OR condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
AJAYREDDY

New User


Joined: 17 Feb 2007
Posts: 52
Location: USA

PostPosted: Mon Jan 07, 2008 11:08 pm    Post subject: How to get Segments with AND and OR condition
Reply with quote

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

Douglas Wilder

Active User


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

PostPosted: Tue Jan 08, 2008 3:57 am    Post subject:
Reply with quote

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

Active User


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

PostPosted: Tue Jan 08, 2008 4:34 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us