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.
I can answer why you get an error when running
bpxwunixwith the command passed beingsh sftp ....:bpxwunixstarts a shell as ifsh -c commandhas been typed, wherecommandis the first parameter tobpxwunix. If you passsh sftp ...as thecommand,bpxwunixwill start a shell assh -c sh sftp ..., so the shell command to be run issh.If
shis 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 filesftp, which is a binary. The error you get is arbitrary, and depends on the bytes read from the file. Try sendingsh lsas command tobpxwunix, and you get some different error.