On Thu, 1 Sep 2011 10:51:14 -0400, Steve Conway wrote: >Dave and Gil, > >Your suggestion worked fine for a single member: >T$SFC:/u/t4sfc: >cp -B "//'sys3.clist(rdmstat)'" /dev/fd1 | cksum >260387907 21600 > >It also works fine for a sequential file: >T$SFC:/u/t4sfc: >cp -B "//'SYS3.FTP.NETRC'" /dev/fd1 | cksum >2567740904 240 > I said it's newline-ignorant. It won't distinguish betweeh:
A B C and: ABC because of the "-B". But if you omit the "-B" it won't distinguish between: A<NL>B and: A B ... which matters little if RECFM=FB. >It fails for an entire PDS: >T$SFC:/u/t4sfc: >cp -B "//'SYS1.MACLIB'" /dev/fd1 | cksum >cp: FSUMF137 partitioned data set source and a file target is not allowed > No hope for that. "| cksum" expects a single sequential stream. But you could verify a TSO TRANSMIT unloaded archive. >It also fails trying to use a classic MVS file (of any DSORG) as input >directly to the cksum command: >T$SFC:/u/t4sfc: >cksum "//'SYS1.MACLIB'" >cksum: FSUM6003 input file "//'SYS1.MACLIB'": EDC5129I No such file or >directory. >T$SFC:/u/t4sfc: >cksum "//'SYS3.FTP.NETRC'" >cksum: FSUM6003 input file "//'SYS3.FTP.NETRC'": EDC5129I No such file or >directory. > Such use of classic data sets is documented and supported for only a handful of utilities (such as "cp"). It happens to work for several others, but is undocumented and presumably unsupported. >Thanks for the pointing in the right direction. I had not noticed the >existence of the cksum command. > POSIX requires it, else IBM wouldn't have provided it. (That's only approximately true. 1.13 newly provides "script" which is not a POSIX requirement. I suspect IBM deemed it invaluable for customer problem reporting.) -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html