| yaeger@us.ibm.com 2006-02-09, 6:55 pm |
| mftips@gmail.com 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.
>...
Your examples are actually incorrect. Your control statements contain
blanks that will result in syntax errors. For example 1, the INCLUDE
statement should be:
INCLUDE COND=(1,80,SS,EQ,C'FIND STRING')
Your second example does NOT do what you say it does.
INCLUDE COND=(1,80,SS,EQ,C'HDR,TRL')
will actually include records with the string 'HDR,TRL' in them. To
include records with the string 'HDR' or the string 'TRL' in them, you
would use this DFSORT INCLUDE statement:
INCLUDE COND=(1,80,SS,EQ,C'HDR',OR,
1,80,SS,EQ,C'TRL')
To include records with the string 'HDR' or the string 'TRL' in
positions 11-13, you could use this DFSORT INCLUDE statement:
INCLUDE COND=(11,3,SS,EQ,C'HDR,TRL')
For those who are not familiar with DFSORT and DFSORT's ICETOOL, I'd
suggest reading through "z/OS DFSORT: Getting Started". It's an
excellent tutorial, with lots of examples, that will show you how to
use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it
online, along with all of the other DFSORT books, from:
www.ibm.com/servers/storage/support...vs/srtmpub.html
Frank Yaeger - DFSORT Team (IBM) - yaeger@us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/
|