Re: Search for a string using SORT



In article <m12ku1lkrkudaa1bbglofuqu9l357tb63f@xxxxxxx>,
Howard Brazee <howard@xxxxxxxxxx> wrote:
On 7 Feb 2006 18:32:01 -0800, "mftips@xxxxxxxxx" <mftips@xxxxxxxxx>
wrote:

To Search for a particular string within a file when the exact position
of that string within a record is not known and to write that record in
the Output file the following SORT card can be used.

Example 1:
SORT FIELDS=COPY
INCLUDE COND= (1, 80, SS, EQ, C'FIND STRING')

This is not the best forum for a SORT question.

I did not read this as a question, Mr Brazee, I read it as a
suggestion/tip... and it was a new one to me, too. I've used batch SUPERC
jobs to do this in the past, eg:

//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,
// 'ANYC')
//NEWDD DD DSN=YOUR.DSN.HERE,
// DISP=SHR
//OUTDD DD SYSOUT=*
//SYSIN DD *
SRCHFOR 'SMITH'
CMPCOLM 1:200

.... but I was unaware that DFSORT could do this ('SS' as a format is
mentioned in the documentation here and there but appears to be missing
from
<http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA00/3.7.2.1?DT=20031124143823#TBLBOZO>
and
<http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA00/C.1?SHELF=&DT=20031124143823&CASE=>
... and to learn A New Thing can be pleasant.

E'en more interesting... I just ran a test against a VSAM KSDS, LRECL=350,
about 65,000 recs, searching for 'SMITH' in columns 1 - 200. ISRSUPC used
1538 I/O counts (whatever those measure) and 2.04 CPU sec, DFSORT (REL
14.0) used 202 I/O counts and 1.10 CPU sec.

DD

.



Relevant Pages

  • Re: PIC A(n)
    ... Howard Brazee wrote: ... I am playing with ... code generation. ... A sentence would be defined as a string of such words, ...
    (comp.lang.cobol)
  • Search for a string using SORT
    ... To Search for a particular string within a file when the exact position ... The Sort card for this will need information like range of columns ... as the width of the search range as done above. ... can even use OMIT COND instead of INCLUDE. ...
    (comp.lang.cobol)
  • Search for a string using SORT
    ... To Search for a particular string within a file when the exact position ... The Sort card for this will need information like range of columns ... as the width of the search range as done above. ... can even use OMIT COND instead of INCLUDE. ...
    (comp.lang.cobol)
  • Re: Finding documents with strings
    ... Howard Brazee wrote: ... documents (including source code) that contain a string. ... SpotLight box and then look in the HTML section? ...
    (comp.sys.mac.misc)
  • Re: Alternative COBOL "telco" source program
    ... Howard Brazee wrote: ... Why did you make your text string so long? ... That was in that "Can't 18" spec. ... ~ Please see website if you wish to contact me privately ~ ...
    (comp.lang.cobol)