I don't know if DFSORT can do this. I'm not too familar with the advanced 
stuff. But that pattern matching is exactly where "regular expressions" would 
be a perfect fit. I would say more, but I fear the small, but very vocal, 
anti-UNIX members.

-- 
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * 
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[email protected]] On Behalf Of Ken Leidner
> Sent: Tuesday, May 29, 2012 1:24 PM
> To: [email protected]
> Subject: Can DFSORT do pattern matching?
> 
> I have a problem that I can solve with REXX ... but 
> would like ideas on how DFSORT, might be able to 
> perform the same function, since I am talking around 
> 1,000,000 plus records.
> 
> As input I have a dataset with a list of dataset 
> names from a catalog (really several catalogs), 
> in columns 1 thru 44.  What I want to do is 
> include or exclude dataset names in the file 
> based on patterns like you might enter on ISPF 3.4
> 
>                  xxx.yyy.*.zzz.**
>                  ttttt.*.rrrrrrr.**
> 
> To make life easier a qualifier will be a value, 
> * or **.  It would be great if the process could 
> accept  bb*, but not a requirement.   Note that 
> there could be 100+ patterns to match, not just a few that 
> could be hardcoded.
> 
> I know how to parse the DSN into qualifiers - 
> painfully (is there a better way?)
> 
> PARSE=(%01=(ABSPOS=01,ENDBEFR=C'.',FIXLEN=8),
> %02=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %03=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %04=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %05=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %06=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %07=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %08=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %09=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %10=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8),
> %11=(ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8)),
> 
> But how to get sort to accept the * or ** to 
> match anything?  I could maybe see a pre pass to 
> convert the trailing ** into a series of 
> *.*.*  ......  But I then there is the 
> zzzz.**.pppp.vvvv.** that would just ruin my 
> day.  Lets say that form is not valid.
> 
> Any ideas?  Code would be great, a concept or 
> process that DFSORT can perform is what I am looking for.
> 
> Ken Leidner                     [email protected]
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to