Question: 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?

Answer: 
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](http://www.sillysot.com/ftp/findrx.txt) (which gives ISPF basic regex capability) -- I've never used it myself though so I can't vouch for it working or not.
I came across this thread after banging my head against the wall for about an hour.
My expereince - as very much a newbie on Z/OS, MVS, etc - is that grep against a PD (or is it a PDS, or a DSN, who knows!) is that this cannot be done directly

So, let's say I have text in a location like this: MYUSERID.SOME.DATA(DATA1)
(let me just interject, I have no idea how to refer to such a data "thing", I think it's a "PD")

Now, if I try to grep against the PD, using what seems like reasonable syntax:

```
===>grep FindMe "//'MYUSERID.SOME.DATA(DATA1)'"

$ grep: FSUM6261 read error on file "//'MYUSERID.SOME.DATA(DATA1)'": EDC511
3I Bad file descriptor.   

```

Some other UNIX utility functions do work, for example:

```
===>cat "//'MYUSERID.SOME.DATA(DATA1)'"

```

and

```
===>cp "//'MYUSERID.SOME.DATA(DATA1)'" ./data.data

```

Others, rather unhelpfully, do not:

```
==>ls "//'MYUSERID.SOME.DATA(DATA1)'"
ls: FSUM6785 File or directory "//'MYUSERID.SOME.DATA(DATA1)'" is not found

```

AND - don't forget, the pipe is your friend, except it may not be the "|" character.
It might very be the "!" (exclamation point) character.

This is basically an exercise in "try it out" the way you would in a real OS/SHELL combination, linux/BASH for example, and when that doesn't work, come up with a workaround for this idiotic, archaic System.

So my solution to your exact question is:

```
===> cat "//'MYUSERID.SOME.DATA(DATA1)'" ! grep FindMe

```