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
 

 

How to use OR condition in Sort card

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

New User


Joined: 29 Jul 2005
Posts: 20

PostPosted: Thu Aug 25, 2005 10:50 am    Post subject: How to use OR condition in Sort card
Reply with quote

Hi all,
I am using Sort utility to Split the input file into 3 output file depending on a character in 3rd character

/SYSIN DD *
OPTION COPY
OUTFIL INCLUDE=(3,1,CH,EQ,C'a'),FNAMES=OUT1
OUTFIL INCLUDE=(3,1,CH,EQ,C'b'),FNAMES=OUT2
OUTFIL INCLUDE=(3,1,CH,EQ,C'c'),FNAMES=OUT3

But I want to move records to, say OUT1 if 3rd char is A or a. How to do this? If I give another OUTFIL INCLUDE with FNAMES OUT1, it is abending.
Back to top
View user's profile Send private message

jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Thu Aug 25, 2005 11:34 am    Post subject:
Reply with quote

Atik,

You should not give another OUTFIL INCLUDE, Perhaps you should write like below

OPTION COPY
OUTFIL INCLUDE=(3,1,CH,EQ,C'a',OR,3,1,CH,EQ,C'A'),FNAMES=OUT1
OUTFIL INCLUDE=(3,1,CH,EQ,C'b'),FNAMES=OUT2
OUTFIL INCLUDE=(3,1,CH,EQ,C'c'),FNAMES=OUT3
Back to top
View user's profile Send private message
atik

New User


Joined: 29 Jul 2005
Posts: 20

PostPosted: Thu Aug 25, 2005 11:54 am    Post subject:
Reply with quote

Masade,
Its working fine. Thanks a lot.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Aug 25, 2005 8:12 pm    Post subject:
Reply with quote

Here's another way to do it with DFSORT:

Code:

  OPTION COPY
  OUTFIL INCLUDE=(3,1,SS,EQ,C'aA'),FNAMES=OUT1
  OUTFIL INCLUDE=(3,1,CH,EQ,C'b'),FNAMES=OUT2
  OUTFIL INCLUDE=(3,1,CH,EQ,C'c'),FNAMES=OUT3


For more information on DFSORT's INCLUDE substring comparison tests (SS), see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/3.7.4?DT=20050222160456
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
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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