Scott,

Thanks for the info. I thought that was the case because, the first time I
tried to do an INSERT to a QTEMP file I found it (as Alan did now) empty. I
checked and found two jobs running, one of them a BATCHI job, where I
supposed my QTEMP file was...

BTW, In your bio I found that you are living in Wisconsin. I live in
Caracas, Venezuela, and right now (15:20 local time) our temp is about 83~84
F *:-) . *Keep warm and drive carefully!!!

Thanks again,

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries


On Fri, Dec 11, 2009 at 2:58 PM, Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx>wrote:

Hello Luis,


I believe that QSH has its own QTEMP, separate from the one your job
uses.


That's more or less true.

Basically, when you run grep, it's running at the same time as your job.
So if you're reading the output of 'grep', you're reading it real-time
as it's happening.

This is more important if you're doing something like this:

QSH CMD('ls | grep blah')

In this example, the output of 'ls' is being read by 'grep'. These two
things run simultaneously... the ls and the grep programs are running
concurrently, which greatly improves performance not to mention memory
usage. (If they didn't run concurrently, the output of 'ls' would have
to be saved into a buffer somewhere so it could be processed by grep
separately, that buffer could potentially be hundreds of megabytes
long...)

Likewise, the output from grep is being displayed concurrently on your
screen if you're running it interactively. (Or if you're reading the
output directly in a program -- though, since you're running this from
CL, you probably aren't)

To enable that concurrency, they are running in separate jobs. the 'ls'
is running in one job, the 'grep' in another, and your program in a 3rd
job. That's how QShell (and indeed, all Unix environments) work.

Therefore, QTEMP and QShell don't play well together. If you want to
use QTEMP you have to make sure it's being used by your CL program so
that it runs inside the same job. If QTEMP is being used by the
background components of QSH (in my example, the 'ls' and the 'grep', or
in Alan's example, the 'db2' and the 'grep') they will have a separate
QTEMP from your CL program.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.