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
 

 

DfSort SS Substring

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Sat Dec 31, 2005 10:40 pm    Post subject: DfSort SS Substring
Reply with quote

Hi to all.
I'd like to know if there is a way to define the separator using the SS format.
I mean: with a simple "search" as:
Code:
 INCLUDE COND=(1,30,SS,EQ,C'AAA')

dfsort work fine but with two item in the constant field as:
Code:
 INCLUDE COND=(1,30,SS,EQ,C'AAA,BBB')

it will not work as expected because comma(for what I've understood) is part of the string and not properly a separator.

Is there a solution?
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: Sun Jan 01, 2006 1:33 am    Post subject:
Reply with quote

I think you're misunderstanding how SS works.

When the field length is larger than the string length, as in your example, DFSORT looks for the string within the field, so it will look for C'AAA,BBB'. If you want to look for AAA or BBB in a larger field, then you have to use:

Code:

   1,30,SS,EQ,C'AAA',OR,1,30,SS,EQ,C'BBB'


When the field length is smaller than the string, as in this example:

Code:

  1,3,SS,EQ,C'AAA,BBB'


DFSORT will check each constant of the specified length against the field. So in this case, DFSORT would check 1-3 for 'AAA', 'AA,', 'A,B', and so on.

You can use any separator or separators you like. Just pick one that won't be found in combination with the strings you're looking for.

For example, if C'AAA,BBB' is a problem because you might have 'AA,' or 'A,B' or ',BB' in 1-3, then you could use C'AAA.BBB' or C'AAA/BBB' or whatever character won't be found.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Mon Jan 02, 2006 3:10 pm    Post subject:
Reply with quote

First of all, happy new year Mr. Frank.
Then, I want to specify that I read much about SS but as usual I'm not able to explain my concept.

What you say is right but I don't know if my concept is only a my need or general because what I'm trying to say is that the SS format in DFSORT is a really powerful solution but not implemented at its top(it's only a my opinion) because the comma may be a separator that allow OR logic operator for the same fields. I mean: these are two sample of what I'm trying to say:
Code:
 1,10,SS,EQ,C'AAA',1,10,SS,EQ,C'BBB'
may be the same of:
Code:
 1,10,SS,EQ,C'AAA,BBB' *with comma(or custom char) as separator


For what I know, if this scenario is true:
Code:
 1,3.SS,EQ,C'AAA,BBB'   = 1,3,SS,EQ,C'AAA',OR,1,3,SS,EQ,C'BBB'


the above may be true too(but it's only a my opinion).

I hope in your patience to interpret my idea.
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: Mon Jan 02, 2006 9:50 pm    Post subject:
Reply with quote

Quote:
I'm not able to explain my concept


I'm not sure I understand what you're saying or asking. I've explained how SS currently works for the two cases, and the book explains it in more detail.

Are you asking to be able to do the equivalent of:

1,10,SS,EQ,C'ABC',OR,1,10,SS,EQ,C'DEF',OR,1,10,SS,EQ,C'GHI'

with a new construct like:

1,10,NW,EQ,C'ABC,DEF,GHI'

where comma would be considered a separator and we would search for ABC or DEF or GHI within 1-10? In that case, the actual separator character would be important and would have to be user controlled. But what I'm saying is the separator character doesn't matter with the SS construct using ORs which is currently available and works fine.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Mon Jan 02, 2006 10:34 pm    Post subject:
Reply with quote

Thanks.
I hope you understand that my question was not a critic, I'm doing many works faster only thanks to the power of Sort and my custom and I we are really,really happy.

But yes, I suppose that finally I'm looking for a way to have a new construct that allow "separator" controlled externally.
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: Mon Jan 02, 2006 10:56 pm    Post subject:
Reply with quote

Ok, I'll add that to the list of candidates for future enhancements to DFSORT. But it's a long list. icon_smile.gif
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Jan 03, 2006 12:38 am    Post subject:
Reply with quote

If it's only a my need I suppose that will be inserted at the end of that list. icon_neutral.gif
Anyway, thanks for your effort.
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 get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts Query using SUBSTRING on a column of ... sasanka DB2 5 Mon Jul 04, 2016 1:01 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm


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