Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query regards INCLUDE COND

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 11:10 am    Post subject: Query regards INCLUDE COND
Reply with quote

Hi,

The following condition is
INCLUDE COND=(558,02,CH,NE,C'PD,PF,X,G')

eqiuvalent to

(558,02,CH,NE,C'PD', OR
558,02,CH,NE,C'PF', OR
558,02,CH,NE,C' X', OR
558,02,CH,NE,C' G',) OR

Is there any single line statement to acheive

(558,02,CH,NE,C'PD', AND
558,02,CH,NE,C'PF', AND
558,02,CH,NE,C' X', AND
558,02,CH,NE,C' G',) AND

Regards
R KARTHIK
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jun 20, 2008 12:17 pm    Post subject:
Reply with quote

Hi,

it's not possible for the same field to have more than 1 value, it can only be an or.


Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jun 20, 2008 12:22 pm    Post subject:
Reply with quote

Hi,
my apologies, I read it as EQ and not NE


Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jun 20, 2008 12:41 pm    Post subject:
Reply with quote

Hi,
INCLUDE COND=(558,02,CH,NE,C'PD,PF,X,G') resolves to AND

ie. NE to PD and NE to PF etc.


Gerry
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 12:47 pm    Post subject: Reply to: Query regards INCLUDE COND
Reply with quote

Hi gcicchet,

U are saying that
INCLUDE COND=(558,02,CH,NE,C'PD,PF,X,G')

is equivalent to

(558,02,CH,NE,C'PD', AND
558,02,CH,NE,C'PF', AND
558,02,CH,NE,C' X', AND
558,02,CH,NE,C' G',) AND

Are u sure?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jun 20, 2008 12:54 pm    Post subject:
Reply with quote

Hi,

I used INCLUDE COND=(1,3,SS,NE,C'350,375') for my test.



Gerry
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 12:55 pm    Post subject: Reply to: Query regards INCLUDE COND
Reply with quote

Because i am getting different output for

INCLUDE COND=(558,02,CH,NE,C'PD,PF,X,G')

RCD IN 914, OUT 413

and

(558,02,CH,NE,C'PD', AND
558,02,CH,NE,C'PF', AND
558,02,CH,NE,C' X', AND
558,02,CH,NE,C' G',) AND

RCD IN 914, OUT 312
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jun 20, 2008 1:09 pm    Post subject:
Reply with quote

Hi,
please note I used SS and not CH in my test.


Gerry
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Jun 20, 2008 1:11 pm    Post subject:
Reply with quote

How about using substring?

Code:

  INCLUDE FORMAT=SS,COND=(558,02,CH,NE,C'PD,PF,X,G')

Regards,
Garry
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 1:33 pm    Post subject: Reply to: Query regards INCLUDE COND
Reply with quote

Hi gcicchet,

I corrected the mistake.

Also as Garry Carroll said whenever i include more than one condition like

INCLUDE COND=(558,02,CH,NE,C'PD,PF,X,G')

Then i have to use

INCLUDE FORMAT=SS,COND=(558,02,CH,NE,C'PD,PF,X,G')
[/quote]
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us