无法在z/OS UNIX Shell中访问PDS [英] Unable to access PDS in z/OS unix shell

查看:111
本文介绍了无法在z/OS UNIX Shell中访问PDS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将文本文件从z/OS UNIX shell中复制到名为P2.OUTPUT($ 010)的PDS,但是每当我运行命令cp file.txt"//P2.OUTPUT($010)时, 我收到一条错误消息,指出P2.OUTPUT(-sh10)是无效的位置.无论出于什么原因,每当我运行命令$ 010时,它就会变为-sh10.我曾尝试将010美元放入''和其他一些东西,但是无论我做什么,似乎都行不通.我认为这是访问文件而不是cp命令的问题,因为我也无法使用cat命令查看成员的内容,并且尝试使用任何命令访问成员的任何错误都将其列为-sh10而不是$ 010.知道我在做什么错吗?

I'm trying to copy a text file from within the z/OS unix shell to a PDS titled P2.OUTPUT($010), but whenever i run the command cp file.txt "//P2.OUTPUT($010)" i get an error stating that P2.OUTPUT(-sh10) is an invalid location. For whatever reason, whenever I run the command $010 becomes -sh10. I've tried putting $010 in '' and a few other things but no matter what I do it doesn't seem to work. I believe it's an issue with accessing the file and not with the cp command because I can't view the contents of the member using the cat command either, and any error trying to access the member using any command lists it as -sh10 instead of $010. Any idea what I'm doing wrong?

推荐答案

问题是unix shell将$0解释为具有值-sh的环境变量,如使用echo $0所示,因此您的命令将变为cp file.txt "//P2.OUTPUT(-sh10)".

The problem is that the unix shell interprets $0 as an environment-variable that has the value -sh as can be seen when using echo $0, so your command becomes cp file.txt "//P2.OUTPUT(-sh10)".

尝试使用反斜杠转义$:cp file.txt "//P2.OUTPUT(\$010)".

Try escaping the $ using a backslash: cp file.txt "//P2.OUTPUT(\$010)".

这篇关于无法在z/OS UNIX Shell中访问PDS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆