Makes you wonder whether some people should be trusted with the CLC instruction!

--

Regards, Gord Tomlin
Action Software International
(a division of Mazda Computer Corporation)
Tel: (905) 470-7113, Fax: (905) 470-6507

Frank Yaeger wrote:
Huh.  DFSORT is doing exactly what it's supposed to do.

  INCLUDE COND=(1,6,CH,GE,C'SMITH ',AND,1,6,CH,LE,C'SMYTHE')

'SMITH' is equal to 'SMITH' and less than 'SMYTHE'  (I<Y'), so the record
is included.
'SMO99Y' is greater than 'SMITH' (O>I) and less than 'SMYTHE' (O<Y), so the
record is included.
'SMO#$' is greater than 'SMITH' (O>I) and less than 'SMYTHE' (O<Y), so the
record is included..
'SMYTHE' is greater than 'SMITH' (Y>I) and eqaul to 'SMYTHE', so the record
is included.
'SMILEY' is less than 'SMITH' (L<T), so the record is omitted.

So what do you see as the "problem" in the logic here?

Frank Yaeger - DFSORT Development Team (IBM) - yae...@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

 => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/


Zaromil Tisler on IBM Mainframe Discussion List <IBM-MAIN@bama.ua.edu>
wrote on 05/26/2010 05:12:09 AM:
Visualize it with these parameters:
INCLUDE COND=(1,6,CH,GE,C'SMITH ',AND,1,6,CH,LE,C'SMYTHE')

Show how, e.g., c'SMILEY' in positions 1 through 6 would qualify for
Inclusion in the output.
SMILEY would fail because every character is the same until you hit
the L but what about SMO99Y where
you wanted every position in the field to be alphabetic?
As specified, the second ("upper") bound is (1,6,CH,LE,C'SMYTHE'), so
"do the comparisons":

First character 'S' is less or equal to 'S', so it "qualifies;
Second character 'M' is less or equal to 'M', so it "qualifies";
Third character 'O' is less or equal to 'Y', so it "qualifies";
Fourth character '9' is NOT less or equal to 'T', so the entire value
c'SMO99Y' is "disqualified".

   -jc-

Looks like DFSORT uses some other logic :)


- CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 13:54 ON WED MAY
26,
2010 -
 OPTION  COPY
 INCLUDE COND=(1,6,CH,GE,C'SMITH ',AND,1,6,CH,LE,C'SMYTHE')

ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 4, OUT: 4


SORTOUT contains following records, the same as SORTIN:

SMITH
SMO99Y
SMO#$!
SMYTHE

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to