Question

  Asked: Mar 6 2008   7:41 PM GMT
  Asked by: Abbey


RUNSQLSTM


RUNSQLSTM, CL, SQL

am executing a RUNSQLSTM out of a CL program that run a source SQL statement in a source file of a library. Everytime the statement is executed I get a output spool file of the SQL parmeters and execution results. How can I prevent this?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



I don't know that you can prevent it, but you sure can hide it or kill it :-)

One "hide it" option would be to:
CRTOUTQ TEMP
CRTPRTF TEMP OUTQ(TEMP)
RUNSQLSTM ... PRTFILE(TEMP)
and then periodically CLROUTQ TEMP

A "kill it" option would be to, in your CL program, simply DLTSPLF xxx SPLNBR(*LAST) where xxx is the name of your source member right after the RUNSQLSTM command runs successfully.

Bruce Vining
http://www.brucevining.com/
Integrated solutions for the System i user community
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400 and Development.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Gilly400  |   Mar 7 2008  10:38AM GMT

Hi,

It might be worth while to do an OVRPRTF with HOLD(*YES) before your RUNSQLSTM command to make sure that the spooled file doesn’t get printed on your default printer.

Regards,

Martin Gilbert.