Comments (3)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 AidanH commented Permalink

I had to add an environment variable for the codeset to get this to work - obviously my environment requires this (I did something similar with your XPathEvaluator REXX) <div>&nbsp;</div> env.0=1 <br /> env.1="LANG=En_GB.IBM-285" <div>&nbsp;</div> I then called bpxwunix with env i.e. <div>&nbsp;</div> call bpxwunix cmd,tmpStem.,filter.,stderr.,env. <div>&nbsp;</div> I called the REXX with a number of variations and all worked brilliantly i.e. <div>&nbsp;</div> CICS[A|B] CICSA CICSB PRODCICS MYCICS - CICS ending with A or B <br /> ^CICS CICSA CICSB PRODCICS MYCICS - Beginning with CICS <br /> ^[^CICS] CICSA CICSB PRODCICS MYCICS - Not beginning with CICS <br /> ^[CICS$] CICSA CICSB PRODCICS MYCICS - Not ending with CICS <div>&nbsp;</div> RegEx now available in TSO - excellent

2 AidanH commented Permalink

If you change the second argument to be a dataset then you can search a dataset for Regular Expressions as follows <div>&nbsp;</div> parse arg mygrep myds <div>&nbsp;</div> myds = """//'"myds"'""" <br /> tmpStem.0=1 <br /> tmpStem.1=myds <div>&nbsp;</div> env.0=1 <br /> env.1="LANG=En_GB.IBM-285" <br /> /* grep -n = show line numbers */ <br /> cmd='cat' myds '| grep -n 'mygrep <br /> /* Do the actual grep */ <br /> call bpxwunix cmd,tmpStem.,filter.,stderr.,env. <div>&nbsp;</div> Then you can do something like (search the dataset for 16 digit numbers) <div>&nbsp;</div> TSO FL "[0-9]\{16\}" A12345.TEST

3 MartinPacker commented Permalink

Like @AidanH comments. Wish there were a "Like" button for comments.