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

Reply via email to