MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FILE-AID BATCH with Multiple IF statements and NE Conditions

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
vemurusatya
Beginner


Joined: 01 Jun 2011
Posts: 2
Topics: 1

PostPosted: Wed Jun 08, 2011 8:19 am    Post subject: FILE-AID BATCH with Multiple IF statements and NE Conditions Reply with quote

I need to skip couple of records from a big file based on the following conditions (Around 20 similar conditions, but for sample I gave only three sets). Due to NE condition with ORIF, it never goes to other than first set of IF conditions:

//SYSIN DD *
$$DD01 USER IF=(35,NE,C'1967714'),IF=(65,NE,C'20110320'),
IF=(347,NE,C'20110428'),

ORIF=(35,NE,C'1967715'),IF=(65,NE,C'20110320'),
IF=(347,NE,C'20110428'),

ORIF=(35,NE,C'9364299'),IF=(65,NE,C'20110320'),
IF=(347,NE,C'20110526'),IF=(133,NE,C'2340'),

Please help me how it fix this issue.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Jun 08, 2011 10:25 am    Post subject: Reply with quote

vemurusatya,


It is always a good idea to check for positive conditions instead of conditions. You can use an INCLUDE COND with sort and it would be easy. If you need help converting it ,then show us the complete control cards and we will show you a way to convert it to DFSORT control cards.

Kolusu

PS : Questions of this type should be posted in the Utilities forum. I am moving this topic
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vemurusatya
Beginner


Joined: 01 Jun 2011
Posts: 2
Topics: 1

PostPosted: Wed Jun 08, 2011 11:03 am    Post subject: Reply with quote

Hello Kolusu,
Thank you very much for your advice. Mean while I tried with SORT OMIT with positive condition, then it works.
Code:

  SORT FIELDS=COPY                                           
  OMIT COND=((35,7,CH,EQ,C'1967714',AND,65,8,CH,EQ,C'20110320'
     AND,347,8,CH,EQ,C'20110428'),                         
   OR,(35,7,CH,EQ,C'1967715',AND,65,8,CH,EQ,C'20110320',     
     AND,347,8,CH,EQ,C'20110428'),   

Appreciate your help.
Satya.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Jun 08, 2011 11:16 am    Post subject: Reply with quote

vemurusatya,

Your control cards can be further simplified like this

Code:

  SORT FIELDS=COPY                               
  OMIT COND=(035,7,SS,EQ,C'1967714,1967715',AND, 
             065,8,CH,EQ,C'20110320',AND,         
             347,8,CH,EQ,C'20110428')             

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group