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
 

 

What does SS in the omit cond mean?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Priti_S

New User


Joined: 18 Feb 2009
Posts: 8
Location: pune

PostPosted: Wed May 27, 2009 10:27 am    Post subject: What does SS in the omit cond mean?
Reply with quote

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
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed May 27, 2009 9:49 pm    Post subject:
Reply with quote

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

http://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'.
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Thu May 28, 2009 5:38 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu May 28, 2009 6:20 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu May 28, 2009 8:23 pm    Post subject:
Reply with quote

I just tested it in SyncSort and I am totally lost icon_rolleyes.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Thu May 28, 2009 9:16 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu May 28, 2009 10:22 pm    Post subject:
Reply with quote

vvmanyam,

you were correct. I apologize for my post.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Thu May 28, 2009 10:45 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu May 28, 2009 11:57 pm    Post subject:
Reply with quote

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?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri May 29, 2009 4:04 am    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Fri May 29, 2009 4:41 am    Post subject:
Reply with quote

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

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.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri May 29, 2009 8:18 am    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri May 29, 2009 12:25 pm    Post subject:
Reply with quote

Frank,Gerry, Dick, Arun!!

Thanks for all your inputs!!

Regards,
Balu
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 -> JCL & VSAM 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 DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm
No new posts Include Cond issue vickey_dw DFSORT/ICETOOL 6 Tue Mar 29, 2016 8:51 pm
No new posts How to detect the Job COND used tdfs JCL & VSAM 28 Tue Feb 09, 2016 8:34 pm
No new posts Join and Omit records- Master File no... shajeeth DFSORT/ICETOOL 5 Tue Jan 26, 2016 8:16 pm


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