IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Include/Omit recs with a specific char anywhere in a field


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Hariatharland

New User


Joined: 22 Dec 2008
Posts: 2
Location: USA

PostPosted: Thu Jan 21, 2010 12:53 am
Reply with quote

Can I write a sort step which will omit/include recs with a particular char/string (example: 'N/A') anywhere in WS-VAR PIC X(100).

WS-VAR
---------
abcdefgh n/a - omit
n/a abahgehv - omit
asdn/aasjdjnm - omit
asdkajsdkjkak - include
asdjhasdk - include
asdb ascasc - include
- include

I don't want to write include statement which searches N/A in every 3 bytes starting from 1 - 100, where i would end up writing 97 or conditions.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jan 21, 2010 3:08 am
Reply with quote

Hi,

try this
Code:
//S1       EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN=input-file                 
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                             
  OPTION COPY                               
  INCLUDE COND=(1,100,SS,EQ,C'N/A')         
/*                                           


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

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Jan 21, 2010 10:01 am
Reply with quote

Just to tell you.. n/a is not equal to N/A
Quote:
abcdefgh n/a - omit

and
Quote:

statement which searches N/A in every 3 bytes starting from 1 - 100
Back to top
View user's profile Send private message
Hariatharland

New User


Joined: 22 Dec 2008
Posts: 2
Location: USA

PostPosted: Thu Jan 21, 2010 9:18 pm
Reply with quote

Guys,
Thanks for your time.

Sorry, I assumed Substring 'SS' would not work. I was wrong.
But I could have tried it before posting.

Thanks anyways.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To Unstring spaces in a field COBOL Programming 3
No new posts Extract records for a specific condit... DFSORT/ICETOOL 25
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts ISRDSLST(3.4) Do not include addition... TSO/ISPF 0
Search our Forums:


Back to Top