Is there a way to execute a command like the following successfully using the //DD: parameter?
//MYPDS DD DISP=SHR,DSN=@17171.T.PARMLIB
//STDIN DD *
fromdsn //DD:MYPDS(TMP) > tmp.dat
fromdsn //DD:MYPDS(MORE) > more.dat
Thanks,
Scott
Get PDS member using //DD:ddname(member)
What you have will work fine except for a minor problem...
If you execute these commands under the z/OS Unix shell, you will get the following error (I assume that this JCL fragment is running under COZBATCH, which runs your STDIN DD input using the z/OS Unix shell)
This is because '(' is a special meta character to the shell. You can avoid this by quoting or escaping the argument. For example:
Note that in the above examples, the single quote, double quote, and backslash characters are processed by the shell and not actually passed as input to the fromdsn command.
If you execute these commands under the z/OS Unix shell, you will get the following error (I assume that this JCL fragment is running under COZBATCH, which runs your STDIN DD input using the z/OS Unix shell)
Code: Select all
fromdsn //DD:MYPDS(TMP) > tmp.dat
FSUM7332 syntax error: got (, expecting Newline
Code: Select all
fromdsn '//DD:MYPDS(TMP)' > tmp.dat
fromdsn "//DD:MYPDS(TMP)" > tmp.dat
fromdsn //DD:MYPDS\(TMP\) > tmp.dat