× 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.



So apparently there are three jobs involved in running a QSH (db2?)
command...

Your standard 5250 job...
QZSHSH job (used for the entire QSH session)
QP0ZSPWP job (spawned for each command?)

The first two have joblogs with at least the "Job nnnnnn/xxxx/xxx started
on ..." message. That third one does not.

Charles



On Mon, Aug 31, 2020 at 10:15 AM Bryan Dietz <bdietz400@xxxxxxxxx> wrote:

...so we need to put a message in the joblog first.

this works on a system without an iASP

QSH CMD('db2 "CALL QSYS2.QCMDEXC(''ADDLIBLE NONEXIST'') ;
select * from table (qsys2.joblog_info(''*''))" > /tmp/loglog.txt')

I get some data back.


Bryan


Charles Wilt wrote on 8/31/2020 9:17 AM:
Correct, as noted in my prior post :)

Still interesting that no records are returned, except on a system with
an
iASP...

Charles

On Mon, Aug 31, 2020 at 5:37 AM Rob Berendt <rob@xxxxxxxxx> wrote:

Perhaps I read Bryan's response wrong.
When I ran his command I got
520158/ROB/QP0ZSPWP
Which basically does say that if you're looking for a way to get the
joblog from your job then using QSH to fire off the SQL is not the way
to
do it.
You might want to try RUNSQLSTM or some of the homegrown EXESQL or
RUNSQL SQL('CREATE TABLE QTEMP.LOGLOG AS (Select * from
table(qsys2.joblog_info(''*''))) with data') COMMIT(*NC)

Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Bryan Dietz
Sent: Friday, August 28, 2020 3:36 PM
To: Midrange Systems Technical Discussion <
midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: QSH db2 command and qsys2.joblog_info() - exit status 1

CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know
the content is safe.


could it be that there were no joblog? i think that the the QSH command
when run from a command prompt will spawn a new job. that job does not
have a joblog.

Try this:
QSH CMD('db2 "values job_name" >> loglog.txt')

you should see a new job.

Bryan


Charles Wilt wrote on 8/28/2020 12:52 PM:
Nobody has any thoughts?

So more info...

From an interactive QSH, (on the problem box)
db2 "select * from table (qsys2.joblog_info('*'))"

returns
0 RECORD(S) SELECTED.

Works fine on another box...

Charles


On Thu, Aug 27, 2020 at 2:23 PM Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:

Any thoughts as to why this would return with an exit status of 1 and
an
outfile that says "0 RECORD(S) SELECTED."?

QSH CMD('db2 "select * from table (qsys2.joblog_info(''*''))" >
loglog.txt')

running
select * from table (qsys2.joblog_info('*'))

in STRSQL returns data in the same 5250 session...

This works fine
qsh cmd('db2 "select * from sysibm.sysdummy1" > test.txt')

And the problem command works fine when run on a different system...

Thanks!
Charles





--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


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.