× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 20-Jul-2016 17:32 -0500, Richard Schoen wrote:
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 ?

crtpf qtemp/null rcdlen(1) mbr(null) maxmbrs(1) size(1 0 0)
ovrdbf stdout qtemp/null inhwrt(*yes) ovrscope(*calllvl)
CALL QZDFMDB2 PARM('INSERT INTO QTEMP.JUNK (JUNK) VALUES
(''This is a test 2'') ')
/* optionally, or as required, also: */
dltovr stdout
dltf qtemp/null


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'')" ')

FYI, that is Start QSH, the QSHell, not PASE. And indeed, that would run under a separate process. So that request would seem unusable, if the intent is to get data into the file in the current process; as seems implied by the attempt with the prior CALL.?.?


Any thoughts appreciated.


IMO, the following seems much simpler:

RUNSQL SQL('INSERT INTO QTEMP.JUNK (JUNK) VALUES
(''This is a test 2'')
') COMMIT(*NONE) NAMING(*SQL)

And depending on what is the definition of the file JUNK, and given more complete requirements [besides what might be inferred with just this contrived example], there may be other, even better, ways to get the literal [or more dynamic] data into the file.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.