Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Include/Omit recs with a specific char anywhere in a field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Include/Omit recs with a specific char anywhere in a field
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: 1703
Location: Australia

PostPosted: Thu Jan 21, 2010 3:08 am    Post subject:
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    Post subject:
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    Post subject:
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    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 More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us