|
Actually the PRTFILE parameter is probably the thing you want. The OUTPUT
parameter is for the preprocessor not the results of the SQL statement
running.
Create a dummy print file in QTEMP then specify that print file when issuing
the RUNSQLSTMT command.
CRTPTF QTEMP/MYSQLPRTF
/* Enter you loop here */
RUNSQLSTM SRCFILE(QTEMP/TEMPSQL)
SRCMBR(TEMPSQL)
++ PRTFILE(QTEMP/MYSQLPRTF)
NAMING(*SQL)
ERRLVL(40)
OUTPUT(*NONE)
-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Tony Carolla
Sent: Friday, March 11, 2005 11:39 AM
To: RPG programming on the AS400 / iSeries
Subject: RunSQLStm Problem
I am using RUNSQLSTM to create a view in QTEMP (repeatedly). I have
created a loop that removes, re-creates, reads, then deletes the view,
each time over a file in a different library. The problem is that,
even if I specify OUTPUT(*NONE) (which is the default), I still get a
printout. The command I am using is:
RUNSQLSTM SRCFILE(QTEMP/TEMPSQL)
SRCMBR(TEMPSQL)
NAMING(*SQL)
ERRLVL(40)
OUTPUT(*NONE)
If there are no errors, no matter what, the statement above generates
a printout. This is clearly a bug, so I am searching for a way around
it. Is there an easy way to remove the spooled files from the job
after each run? I know I can override the print file to a certain
USRDTA, and then DLTSPLF for that group of spooled files, but it just
seems ridiculous! I want no output! HELP!
--
"Enter any 11-digit prime number to continue..."
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.