View previous topic :: View next topic
|
Author |
Message |
Hariatharland
New User
Joined: 22 Dec 2008 Posts: 2 Location: USA
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
Hariatharland
New User
Joined: 22 Dec 2008 Posts: 2 Location: USA
|
|
|
|
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 |
|
|
|