# What does SS in the omit cond mean?

Author Message
Priti_S

New User

Joined: 18 Feb 2009
Posts: 8
Location: pune

 Posted: Wed May 27, 2009 10:27 am Hi, I was just reading thru one of the post for sort. I wanted to know what does the SS in the following omit condition mean? OMIT COND=(1,1,SS,EQ,C'H,T') and can we achieve the same result using OMIT COND=(1,1,CH,EQ,C'H,T') Regards
Frank Yaeger

DFSORT Developer

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

Posted: Wed May 27, 2009 9:49 pm

SS is for substring search. See the following for more details:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG30/2.2.6?DT=20080529102039

Those two OMIT statements will not achieve the same result.

 Code: OMIT COND=(1,1,SS,EQ,C'H,T')

Will omit the record if it has H or T (or comma) in position 1.

 Code: OMIT COND=(1,1,CH,EQ,C'H,T')

Will omit the record if it has H in position 1. C'H,T' is truncated to the length of the field = 1 -> C'H'.
vvmanyam

New User

Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

Posted: Thu May 28, 2009 5:38 pm

I have got another doubt here!!
1. From the link provided by you
 Code: INCLUDE COND=(106,5,SS,EQ,C'BIOL ,HIST ,BUSIN,PSYCH')

2.
 Code: OMIT COND=(1,1,SS,EQ,C'H,T')

As you mentioned, the second codition is searching for 3 strings they are
1. 'H'
2. ','
3. ' T'
Which means that ',' is not used as seperator, its just another string.
So, in that case the first codition should search for the following strings right?
1. 'BIOL '
2. ',HIST'
3. ' ,BU'
4. 'SIN,P'
5. 'SYCH' but this not right. How is this handled?
In what case ',' is used as seperator and in what case it is used as another string?
If length of the string is one, will comma be used as another string?

Regards,
Balu
dbzTHEdinosauer

Global Moderator

Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

Posted: Thu May 28, 2009 6:20 pm

 Code: C'BIOL ,HIST ,BUSIN,PSYCH' --12345-12345-12345-12345

I'd be careful trying to catch Frank in an error.
Were he a COBOL programmer, I'd maybe try.
But he is an assembler type.........don't mess with them.
The kind of quality control that the SORT Team has to go thru
(a gazillion users)
makes them somewhat precise.

My advice, always double check......which you did not do.
Arun Raj

Moderator

Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

 Posted: Thu May 28, 2009 8:23 pm I just tested it in SyncSort and I am totally lost
Frank Yaeger

DFSORT Developer

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

Posted: Thu May 28, 2009 9:16 pm

The comma is part of the string. Here's what the DFSORT APG says:

 Quote: Note that the comma is used within the constant to separate the valid values; any character that will not appear in the field value can be used as a separator in the constant.

The best way to illustrate this is with a better example. Say we have:

1,3,SS,EQ,C'ABC,DEF'

SS first searches for 'ABC', then 'BC,', then 'C,D', then 'DEF'.

If the record can contain 'BC,' or 'C,D', then that matters. But in most cases, only ABC or DEF would appear in the record, so the combinations with the comma don't matter. Usually, inserting comma separators is enough to prevent getting a hit on any unwanted values. Another separator could be used instead, e.g. C'ABC\$DEF' if that will work where the comma wouldn't.

 Quote: If length of the string is one, will comma be used as another string?

Yes. If the comma is a problem in that case, you could just use 1,1,SS,EQ,C'HT'.

SS doesn't really use the separator as a separator. It's just another character, but that's usually not a problem. However, it helps to know how it actually works (as documented in the book) in case the use of the separator ever does matter.
dbzTHEdinosauer

Global Moderator

Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

 Posted: Thu May 28, 2009 10:22 pm vvmanyam, you were correct. I apologize for my post.
Frank Yaeger

DFSORT Developer

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

Posted: Thu May 28, 2009 10:45 pm

Dick,

 Quote: I'd be careful trying to catch Frank in an error.

 Quote: you were correct.

Sorry to nitpick, but can you clarify what you were correct about.

AFAIK, I didn't make any error in my description of SS. vvmanyam was correct in his question about how it worked, but I never said that it worked any other way and neither did the DFSORT APG.
dbzTHEdinosauer

Global Moderator

Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

 Posted: Thu May 28, 2009 11:57 pm His and your explanation of SS were the same. I assumed that an SS clause with a length meant that the search-keys were blocked. But they are not. I thought that the comma was/is a separator. I did not think that you had made an error. I tried to take part in a discussion where I had no knowledge. ok, is everybody happy now?
gcicchet

Senior Member

Joined: 28 Jul 2006
Posts: 1702
Location: Australia

Posted: Fri May 29, 2009 4:04 am

Hi,

OK, for my 2 cents worth, for SS where the length of the key is greater than 1 byte I would not use this approach, nor use a separator.

Why carry out more tests than is required. ?

In this case

 Code: 1,3,SS,EQ,C'ABC,DEF' SS first searches for 'ABC', then 'BC,', then 'C,D', then 'DEF'.

I think you may have missed
 Code: ,DE

I would use
 Code: 1,3,CH,EQ,C'ABC',OR,                1,3,CH,EQ,C'DEF')

Gerry
Frank Yaeger

DFSORT Developer

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

Posted: Fri May 29, 2009 4:41 am

Yes, I did miss ,DE (good thing I put code in to do these things instead of doing it myself by hand).

 Quote: Why carry out more tests than is required. ?

Yes, although SS can be easier to code (especially for a lot of values), it can cost a bit more CPU time. Of course, your mileage may vary - I have found cases where SS actually performs better than OR.
gcicchet

Senior Member

Joined: 28 Jul 2006
Posts: 1702
Location: Australia

Posted: Fri May 29, 2009 8:18 am

Hi Balu,

 Code: INCLUDE COND=(106,5,SS,EQ,C'BIOL ,HIST ,BUSIN,PSYCH')

equates to a search for the following
 Code: BIOL IOL , OL ,H L ,HI  ,HIS ,HIST HIST IST , ST ,B T ,BU  ,BUS ,BUSI BUSIN USIN, SIN,P IN,PS N,PSY ,PSYC PSYCH

Gerry
vvmanyam

New User

Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

 Posted: Fri May 29, 2009 12:25 pm Frank,Gerry, Dick, Arun!! Thanks for all your inputs!! Regards, Balu
 View Bookmarks All times are GMT + 6 Hours

 Topic Forum Replies Similar Topics Use input file with OMIT rcd keys? DFSORT/ICETOOL 15 Reference for COND parameter. JCL & VSAM 1 IEF142I and Cond. Code 12 All Other Mainframe Topics 3 How to OMIT Records older than the cu... DFSORT/ICETOOL 15 Cond parameter and Rc code of a proce... JCL & VSAM 5
Search our Forums:

 IBMMainframes.com is not an official and/or affiliated with IBM® in anyway Board Rules | FAQ | Downloads | Wiki | SiteMap | Contact Us