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



Hi Scott, actually, I'm not able to get this pgm to work;
 
    CRTPF QTEMP/TEST RCDLEN(100)
    OVRDBF FILE(STDOUT) TOFILE(QTEMP/TEST)
    QSH CMD('echo Test Test Test')

 
I ran all the commands manually and when I run the QSH command;
 
QSH CMD('LS -C /PROGRAMMINGARCHIVE/* > /QSYS.LIB/QTEMP.LIB/test.FILE/test
.MBR')                                                                   
 
I get msg, Command ended normally with exit status 2.                           
    

 
Do I have to crtpf stdout in a library?  
 
 
 
 
 
-----Original Message-----
From: fbocch2595@xxxxxxx
To: midrange-l@xxxxxxxxxxxx
Sent: Wed, 18 Oct 2006 2:22 PM
Subject: Re: QSH using QTEMP


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.