Radoslaw Skorupka wrote on 08/03/2006 01:24:00 AM:
>
> The step is ended OK (RC=0), but the records are not OMITted. I suspect,
> that records shorter than 32000 are not filtered.
>
> BTW: I think I got the solution. Someone sent it to me offline (THANK
> YOU!). I just did quick test and it seems to be OK:
>        OMIT COND=(5,32000,SS,EQ,C'SMITH')
>        OPTION COPY,VLSCMP
> note the *vlsCMP*
>
> Now I'm going to 'RTFM' about VLSMP.

Radoslaw,

I see you got the answers to your questions.  FWIW, had I been here instead
of on vacation, I would have given these answers to your initial post:

1. You need to use DFSORT's VLSCMP parameter rather than the VLSHRT
parameter to get what you want.  VLSHRT will not OMIT any of the "short"
records so it's not what you want.  VLSCMP will treat the "short" records
as if they were padded with binary zeros on the right allowing, you to find
'SMITH' anywhere in each VB record.  For more information on using VLSCMP
and VLSHRT with INCLUDE/OMIT, see the "How can I use INCLUDE/OMIT with
"short" fields?" Ask Professor Sort item at:

www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/

2. If you just want the minimum and maximum, you can use this very simple
DFSORT/ICETOOL job:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (VB)
//TOOLIN DD *
STATS FROM(IN) ON(VLEN)
/*

You'll get messages like this in TOOLMSG that will give you the minimum,
maximum, average and total record length:

ICE608I 0   MINIMUM:  +000000000000031, MAXIMUM:  +000000000000084
ICE609I 0   AVERAGE:  +000000000000039, TOTAL  :  +000000000000317

If you just want the record lengths, you can use this very simple
DFSORT/ICETOOL job:

//S2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (VB)
//SHOW DD SYSOUT=*
//TOOLIN DD *
DISPLAY FROM(IN) LIST(SHOW) ON(VLEN) BLANK
/*

You'll get a report like this in SHOW:

RECORD LENGTH
           84
           47
           31
           31

Of course, you can use both the STATS and DISPLAY operators in the same
ICETOOL step, or use DISPLAY with the MINIMUM and MAXIMUM parameters to get
the record lengths AND min/max instead of using STATS.  And you can create
much fancier versions of this report using various DFSORT/ICETOOL
parameters if you like.

3. Yes, you can use OUTFIL with OMIT and SAVE to do that:

//S3 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//OUT1 DD DSN=...    output file1 (VB)
//OUT2 DD DSN=...    output file2 (VB)
//SYSIN DD *
   OPTION COPY,VLSCMP
   OUTFIL FNAMES=OUT1,OMIT=(5,32000,SS,EQ,C'SMITH')
   OUTFIL FNAMES=OUT2,SAVE
/*

Frank Yaeger - DFSORT Team (IBM)
 Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

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

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

Reply via email to