Re: Search for a string using SORT
- From: docdwarf@xxxxxxxxx ()
- Date: Thu, 9 Feb 2006 13:41:21 +0000 (UTC)
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
.
- Follow-Ups:
- Re: Search for a string using SORT
- From: yaeger
- Re: Search for a string using SORT
- From: Howard Brazee
- Re: Search for a string using SORT
- References:
- Search for a string using SORT
- From: mftips@xxxxxxxxx
- Re: Search for a string using SORT
- From: Howard Brazee
- Search for a string using SORT
- Prev by Date: Re: File declarations in the Environment and Data division
- Next by Date: Re: Search for a string using SORT
- Previous by thread: Re: Search for a string using SORT
- Next by thread: Re: Search for a string using SORT
- Index(es):
Relevant Pages
|