FSUM7332 – 在 z/OS 下使用 bpxwunix 时,期望新行。

huangapple go评论52阅读模式
英文:

FSUM7332 - expecting new line when using bpxwunix under z/OS

问题

sftp 1216: FSUM7332 语法错误:得到 ), 期望 Newline

我已经为REXX中的sftp创建了一个'批处理'文件,并使用address syscall writefile将数据写入文件。

通过bpxwunix这样调用sftp:sftp -b batchfile userid@host

文件是这样创建的:

stdin = workdir/'sysvar('sysuid')'.sftp.stdin
out.1 = 'put' workdir/'filename'
out.2 = 'quit'
out.0 = 2
address syscall 'writefile (stdin) 700 out.'

我尝试在每个stem行的末尾添加'25'x,但没有成功。

英文:
sftp 1216: FSUM7332 syntax error: got ), expecting Newline

I've created a 'batch' file for sftp in REXX and have used the address syscall writefile to write out the data to the file.

the sftp is invoked using bpxwunix thus: sftp -b batchfile userid@host

The file is created thus:

stdin = workdir'/'sysvar('sysuid')'.sftp.stdin' 
out.1 = 'put' workdir'/'filename                
out.2 = 'quit'                                  
out.0 = 2                                       
address syscall 'writefile (stdin) 700 out.'  

I tried to add '25'x at the end of each stem line without success.

答案1

得分: 2

我可以回答为什么在运行bpxwunix时,传递的命令是sh sftp ....会出错:

bpxwunix启动一个shell,就好像键入了sh -c command一样,其中command是传递给bpxwunix的第一个参数。如果将sh sftp ...作为command传递,bpxwunix将启动一个shell,即sh -c sh sftp ...,因此要运行的shell命令是sh

如果以这种方式调用sh,则将第一个单词视为shell命令文件,从中shell尝试读取命令。在您的情况下,shell尝试从文件sftp中读取命令,而该文件是一个二进制文件。您收到的错误是任意的,并且取决于从文件中读取的字节。尝试将sh ls作为命令发送给bpxwunix,您将得到一些不同的错误。

英文:

I can answer why you get an error when running bpxwunix with the command passed being sh sftp ....:

bpxwunix starts a shell as if sh -c command has been typed, where command is the first parameter to bpxwunix. If you pass sh sftp ... as the command, bpxwunix will start a shell as sh -c sh sftp ..., so the shell command to be run is sh.

If sh is called that way, the first word is taken as a shell command file, from which the shell tries to read commands. In your case, the shell tries to read commands from file sftp, which is a binary. The error you get is arbitrary, and depends on the bytes read from the file. Try sending sh ls as command to bpxwunix, and you get some different error.

huangapple
  • 本文由 发表于 2023年7月20日 21:29:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76730407.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定