Ok, thanks, I'm using it now.   
 
 
-----Original Message-----
From: midrange-l@xxxxxxxxxxxxxxxx
To: midrange-l@xxxxxxxxxxxx
Sent: Wed, 18 Oct 2006 2:17 PM
Subject: Re: QSH using QTEMP



Does V5R4 allow ls commands to an outfile in qtemp?

Every release allows ls commands to an outfile in QTEMP.  But you can't do 
it using QShell's redirection operators, you have to use OVRDBF.

You see, The QSHELL commands run in a separate, background job.  If they 
write files directly to QTEMP, it would not be accessible to your job 
because there's a different copy of the QTEMP library for each job on the 
system.  So it wouldn't do any good.

However, any job can use OVRDBF to redirect STDOUT to a file.  That 
happens in the current job, so it can direct stuff to QTEMP.

For example, this will direct the output from LS to a file in QTEMP:

PGM
       CRTPF QTEMP/DIRLIST RCDLEN(5000)

       OVRDBF FILE(STDOUT) TOFILE(QTEMP/DIRLIST)
       QSH CMD('ls -l')
       DLTOVR FILE(STDOUT)
ENDPGM


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.