Hello,

On 2/13/2012 9:00 AM, craigs@xxxxxxxxx wrote:
I searched the internet carefully and still haven't found anything. I'm
looking for a general direction on why using the local system (!system
"<cmd>") from SFTP within QSH command entry would work but not from an SFTP
batch script run interactively.

Not sure. I have to admit, I really have never run a !system command from a batch sftp script. I tend to run my sftp scripts from CL programs, so if I need to run a CL command, I simply run it in the CL program.

I can take a guess (based on absolutely no experience) that perhaps you are running out of available concurrent jobs in your subsystem? When you run the ! command, it'll almost certainly spawn a job.


I tried the -i option and -bOE. I thought the -i option would ensure the
job wouldn't be spawned just in case but it didn't make a difference.

Interesting. My copy of sftp doesn't have -i or -bOE. (Well, it has -b which runs a batch script, but -OE it doesn't have.)

Not sure what you're talking about here.

I tried various commands and they state to complete fine but they
aren't even touched. I'm not doing any expect scripts or anything
complex. Just login, !system "<cmd>", quit. I could try to focus on
settings again but I don't really know what to focus on. Could there
be something not set in SFTP configuration?

Is it possible that your PATH is different in batch than it is interactively? Maybe one instance is using /usr/bin/system and the other is running /QOpenSys/usr/bin/system? (Though, I'm not sure why that would cause it to fail.)

I guess I could try a few tests. Any particular command to try?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.