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



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.

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.