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
 

 

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 How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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