Difference between COND with 'OR' and 'AND'



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Difference between COND with 'OR' and 'AND'

Postby nikesh_rai » Fri Jan 18, 2013 10:04 pm

Hi,

Can someone please help me out to understand what is the actual difference between COND with 'OR' and 'AND' option

for example
//SYSIN    DD *                           
     SORT FIELDS=COPY                     
     INCLUDE COND=(1,80,CH,NE,C' '),AND,   
                   1,80,SS,NE,C'88 '))     
/*


and

//SYSIN    DD *                           
     SORT FIELDS=COPY                     
     INCLUDE COND=(1,80,CH,NE,C' '),OR,   
                   1,80,SS,NE,C'88 '))     
/*       


I tried to go through manuals but didn't get anything.
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: Difference between COND with 'OR' and 'AND'

Postby Akatsukami » Fri Jan 18, 2013 10:16 pm

The same as between AND and OR in any formal context.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Difference between COND with 'OR' and 'AND'

Postby BillyBoyo » Fri Jan 18, 2013 10:31 pm

One opening and three closing :-)

Why use INCLUDE and then have NE? Keep everything simple.

If simple, you'll (and anyone else will) understand better.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Difference between COND with 'OR' and 'AND'

Postby steve-myers » Fri Jan 18, 2013 10:32 pm

In any event, this is a sort question, not a JCL question. Since the topic starter did not bother to tell us which sort product they are using, the moderators can't move this topic to the appropriate area.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Difference between COND with 'OR' and 'AND'

Postby dick scherrer » Sat Jan 19, 2013 12:37 am

Hello,

If you want help, you need to post syntax that is correct and your question about it or the error(s) encountered. There is no difference between your samples as they will both not run.

You also need to post which sort product is being used. As mentioned, this NOT a jcl question.

Where did you find this code?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post