I have a search I'd like to run against a zOS dataset, and I know how to form the grep command. I have access to the machine via Unix system services, how to I address a dataset from that environment?

link|improve this question

76% accept rate
1  
+1 I think it is the first z/OS question around here :) – kubanczyk Feb 3 at 21:26
@kubanczyk I've got plenty more if you want them ... – C. Ross Feb 4 at 1:04
Absolutely - I don't think we have many z/OS folks but good questions would go a long way to attracting them :) – voretaq7 Feb 4 at 1:23
feedback

2 Answers

How big a data set are we talking about?
The Unix system services cp command can take data sets as a source, and a Unix file (or directory) as a target, so conceivably if the data set is small enough you can copy it into files and grep away to your heart's content.

As an alternative, if you can open your data set in ISPF on the z/OS machine you may want to consider using FINDRX (which gives ISPF basic regex capability) -- I've never used it myself though so I can't vouch for it working or not.

link|improve this answer
The data sets aren't that big (COBOL source), but there are 200+ of them ... – C. Ross Feb 4 at 1:05
feedback

No need to cp first. You can cat, tail, grep etc. The thing to remember is the special quoting and that the DSN is preceded by two slashes:

cat "//'s052WX.EO.REXX(MYREXXSOURCE)'" | grep parse

If you look in the UNIX command reference manual under the cp command there’s more info.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.