×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hey Jim,

Is this technique only used for items that create STDOUT or does it have other use cases ?

I'm used to doing the OCVDBF on STDOUT with PASE and QSH calls.

And yes I now know about RUNSQL :-)

Regards,


Richard Schoen
Director of Document Management
e. richard.schoen@xxxxxxxxxxxxxxx
p. 952.486.6802
w. helpsystems.com
------------------------------

message: 3
date: Thu, 21 Jul 2016 06:53:00 -0500
from: "Jim Oberholtzer" <midrangel@xxxxxxxxxxxxxxxxx>
subject: RE: Question on using QZDFMDB2 to run SQL interactively in a
CL program

I've used this in the past:

/*******************************************************************/
/* Don't present a Qshell terminal session, keep a log of all
*/
/* activity.
*/
/*******************************************************************/

ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) +
VALUE('FILEAPPEND=/tmp/program.shell.log')
MONMSG CPFA980 /* Error adding value */
ADDENVVAR ENVVAR(QIBM_QSH_CMD_ESCAPE_MSG) +
REPLACE(*YES) +
VALUE(Y)
MONMSG CPFA980 /* Error adding value */



But another question: Why not just use RUNSQL? It's an IBM command and
does inserts with no muss or fuss.

--
Jim Oberholtzer
Agile Technology Architects


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Richard Schoen
Sent: Wednesday, July 20, 2016 5:32 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Question on using QZDFMDB2 to run SQL interactively in a CL program

Using the following call in a CL works fine and allows me to use current job
QTEMP library to insert a record to a file in QTEMP.

However the call prompts at the end to "Press Enter to end terminal
session."

CALL PGM(QZDFMDB2) PARM('INSERT INTO QTEMP.JUNK (JUNK) VALUES(''This is a
test 2'')')

Any ideas what I might need to override to get rid of the prompt in an
interactive job ?

I can use the Pase equivalent below if needed, but can't access files in
current job QTEMP library:

QSH('Db2 "INSERT INTO QTEMP.JUNK (JUNK) VALUES(''This is a test 2'')" ')

Any thoughts appreciated.

Regards,

[http://static.helpsystems.com/hs/email/templates/signatures-final/images/hs
-logo2.png]

Richard Schoen
Director of Document Management

e. richard.schoen@xxxxxxxxxxxxxxx<mailto:richard.schoen@xxxxxxxxxxxxxxx>
p. 952.486.6802
w. helpsystems.com<http://www.helpsystems.com/>
[cid:image002.jpg@01D1E2AC.AC74C0C0]<http://www.linkedin.com/in/richardschoe
n>[cid:image003.jpg@01D1E2AC.AC74C0C0]<http://www.twitter.com/richardschoen>

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2026 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.