Roger, If you want, I will send you a copy of my SEARCH package. It will handle the problem quite nicely.
Regards, Richard Schuh ________________________________ From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf Of Wilson, Roger Sent: Friday, January 15, 2010 9:49 AM To: IBMVM@LISTSERV.UARK.EDU Subject: search a file for 2 character strings I am trying to write a rexx exec that counts the number occurrences of 2 strings of characters. I could like to search for N798 and C798 Right now I just do the look at the unique characters results. This is what I have: /* WORDUSE EXEC -- Word Use Analyzer */ parse arg fid 'pipe (endchar ?)', '<' PLOG PRINT W, /* READ THE FILE */ "| xlate lower 41-7f 40 ' ' ", /* Translate to lowercase, and get */ , /* rid of punctuation */ '| a: count words lines', /* Count words and lines */ '| split', /* Put one word per record */ '| sort count', /* Sort unique with a count of dups */ '| b: count lines', /* Count the number of unique words */ '| specs 1-10 1 11-* 15', /* Format the sorted records */ '| f: fanin', /* Make sure summary lines at end */ '| literal Times Used Word', /* Write a header */ '| console', /* Display it */ '?', 'a:', /* Process the word and line count */ '| specs /Number of lines: / 1 words2 next write', '/Total number of words: / 1 words1 next', '| f:', '?', 'b:', /* Process the unique word count */ '| specs /Total number of unique words: / 1 words1 next', '| f:' exit RC The City of Milwaukee is subject to Wisconsin Statutes related to public records. Unless otherwise exempted from the public records law, senders and receivers of City email should presume that the email are subject to release upon request, and to state records retention requirements. See City of Milwaukee full email disclaimer at www.milwaukee.gov/email_disclaimer.