Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running QSHELL from CL program generates an unwanted spool file

969 views
Skip to first unread message

steve.b...@rowtonit.com

unread,
Jun 22, 2012, 10:13:21 AM6/22/12
to
Hi

I've written some CL that runs and sFTP script via QSH, it all works great but every time it executes I'm left with a spool file for QPRINT containing a single line of text

"select: A file descriptor does not refer to an open file."

This does not impact on the program but I generate hundreds of these week and would really like to find a way of stopping them from being generated.

Sample of code below, many thanks

/* Set the environment values to pipe responses into a file */
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) +
VALUE('FILE=/home/davidnei/sftp02_output.txt') REPLACE(*YES)
ADDENVVAR ENVVAR(QIBM_QSH_CMD_ESCAPE_MSG) VALUE(Y) REPLACE(*YES)

/* sFTP into web server using commands in script file web02.txt*/
QSH CMD('PATH=$PATH:/QOpenSys/usr/bin && sftp -b +
/home/webuser/web02.txt web...@172.16.32.13')
Message has been deleted

Jonathan Bailey

unread,
Jun 28, 2012, 10:07:05 AM6/28/12
to
I suppose redirecting the output to /dev/null dosnt work since you have done some other redirection.

Try the cl command dltsplf after your qsh command:
dltsplf spoolfilename splnbr(*last)

The only other way is to step through the ftp script to see what point its generated and see if there is a way to prevent that step generating the splf.

Jonathan
0 new messages