Hi Lionel,
Did you try this with an existing zFS cluster? I get the same error:
> cat //'dovetail.usrloc.zfs'
cat: //dovetail.usrloc.zfs: EDC5049I The specified file name could not be
located.
FWIW, you can use the Co:Z "catsearch" shell command, which is a shell
command interface to IGGCSI00, etc. (free to use under our Community
License).
For example:
> count=$(catsearch dovetail.usrloc.zfs | wc -l )
> echo $count
1
Back to the original problem - why not use "mount" and redirect stderr
somewhere to a temp file that your script can look at. There might be
errors mounting other than the data set not existing.
Kirk Wolf
http://dovetail.com
PS> There seems to be a legitimate problem with the error returned by
"cat". If I try to read the zfs using the Co:Z "fromdsn" shell command
(which opens and reads using fopen() / fread():
> fromdsn //dovetail.usrloc.zfs
fromdsn(DOVETAIL.USRLOC.ZFS)[E]: DatasetHandler: Error in
fopen(//'DOVETAIL.USRLOC.ZFS', rb,type=record,noseek,recfm=*) - EDC5041I An
error was detected at the system level when opening a file.
(errno2=0xC00A0022)
This is an expected error, since reading VSAM with fread() is not supported
by z/OS for linear data sets.
But doing this on a non-existing file results in:
>fromdsn foo.bar
fromdsn(FOO.BAR)[E]: DatasetHandler: Error in fopen(//'FOO.BAR',
rb,type=record,noseek,recfm=*) - EDC5049I The specified file name could not
be located. (errno2=0xC00B0641)
If you look up the errno2 (reason codes) with bpxmtext, these look right.
You can get cat to print out the errno2 with:
>export _EDC_ADD_ERRNO2=1
/u/vendor/kirk>/bin/cat //'DOVETAIL.USRLOC.ZFS'
cat: //DOVETAIL.USRLOC.ZFS: EDC5049I The specified file name could not be
located. (errno2=0xC00B0641)
>bpxmtext c00b0641
JrEdc1opsElocate01: The filename argument passed to fopen() or freopen()
specified dsname syntax. The mode argument specified read. Allocation of a
ddname for the dsname was attempted, but SVC 99 failed with error code
0x1708.
The data set name could not be located. You cannot use read mode for a data
set that does not exist.
Action: Correct the application.
Source: edc1opst.c
That's just weird.