On Thu, 6 Sep 2007 10:32:42 -0500, Kirk Wolf wrote: >The results are interesting when I actually tried using the cp command >with //DD:xxxx(mem) :-) > >The "cp" command doesn't properly handle the "//DD:xxxx(member)" >syntax that fopen supports. It seems to always result in the >following error, even if the output file DCB matches: > "cp" is too smart (read complicated) for the programmers' own good. It would be better if it tried to be less UNIX-y in its handling of non-UNIX facilities and simply allowed the programmer to supply the exact argument strings to fopen() rather than synthesizing them from UNIX-style command line switches.
If you have found documentation that "cp" supports the "//DD:xxxx(mem)" construct (I couldn't), you have grounds for a PMR. >But, "cat", which is *not* documented to support MVS dataset names >(although I use it all the time), works perfectly. > "cat" is better because it doesn't try to outsmart the programmer. But, as you recognize, unsupported. Can you process binary files and text files alike? >IMO, the solutions using a utility like IEBCOPY aren't ideal since >they require control cards to specify the member name, which can't be >parameterized in JCL without some other helper utility. > There have been plenty of rants about this; don't tempt me! >//COPYSRC EXEC PGM=BPXBATSL, >// PARM='PGM /bin/cat //DD:LIB(&MEM)' >// ... >//STDOUT DD DSN=&&SRC,DISP=(NEW,PASS), > Must be 1.7 or higher. Wasn't that (or 1.8?) the first release that supports non-UNIX files as DD STDOUT? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html