Radoslaw,

If you have access to SyncSort you can accomplish everything you are
trying to do very easily.  

Answer to question #1.  To receive the desired output you will need to
use the parm of VLTESTI=2.  This tells the sort to treat just the single
comparison as false if the entire field is not present.  This is useful
when you have multiple comparisons and some fields are present and some
are not.  When the SS data type is used, VLTESTI is smart enough to look
for the string in the portion of the field that is present.  In your
first set of control cards, SyncSort will look for SMITH anywhere from
position 5 until the end of the record.
  
Answer to question #2.  SyncSort provides a HISTOGRM program that will
report on the lengths of the records in a VL data set.  This is
documented in the Programmer's Guide.  It is very easy to use.  If you
need help, let me know and I will be glad to work with you.  

Answer to question #3.  The following OUTFIL statement should do what
you are looking for in question #3.

  OUTFIL FILES=01,OMIT=(5,32000,SS,EQ,C'SMITH')
  OUTFIL FILES=02,SAVE

If this is not what you are looking for let me know.  I'm sure we can
help you out. 

Sincerely, 
John Reda
Software Services Manager
Syncsort Inc.
201-930-8260
 

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
> Behalf Of R.S.
> Sent: Tuesday, August 01, 2006 12:42 PM
> To: [email protected]
> Subject: DFSORT and SS
> 
> I have variable length records to filter.
> I should omit all records containing given string, i.e. SMITH.
> I used the following syntax:
> 
> OMIT COND=(5,32000,SS,EQ,C'SMITH')
> OPTION COPY,VLSHRT
> 
> Unfortunately it doesn't work. When I changed the lenght:
> OMIT COND=(5,900,SS,EQ,C'SMITH')
> then some records were filtered. I suspect that only records longer
than
> 904 bytes and containing SMITH in first 900 bytes (excluding RDW).
> 
> Q: How to fix it, I mean omit all records containing SMITH, regardless
> of the length ?
> 
> 
> Q2: What is simple method to find out records length, one by one, or
> just min and max ?
> 
> Q3: How can I split output, put record without the string in one
> dataset, and the rest (with the string) in another one ? Should I use
> OUTFIL or rather something else ?
> 
> Regards
> --
> Radoslaw Skorupka
> Lodz, Poland

----------------------------------------------------------------------
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