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



13700 - CRTPF FILE(QTEMP/Z28IFS1P) RCDLEN(132) SIZE(*NOMAX) File Z28IFS1P created in library QTEMP. Member Z28IFS1P added to file Z28IFS1P in QTEMP. 14200 - CRTPF FILE(QTEMP/Z28IFSFP) SRCFILE(ZPGMR73/QDDSSRC) SIZE(*NOMAX) File Z28IFSFP created in library QTEMP. Member Z28IFSFP added to file Z28IFSFP in QTEMP. 14800 - OVRDBF FILE(Z28IFS1P) TOFILE(QTEMP/Z28IFS1P) 14900 - QSH CMD('LS -C /PROGRAMMINGARCHIVE/* > /QSYS.LIB/TESTDP.LIB/Z28IFS1P.FILE/Z28IFS1P.MBR') Why does the qsh return...Command ended normally with exit status 2 and the qprint file shows; qsh: 001-0055 Error found creating file /QSYS.LIB/TESTDP.LIB/Z28IFS1P.FILE/Z28IFS1P.MBR. No such path or directory. Why isn't this working?

Because you are still using redirection. Don't. Redirection is all this stuff '> /QSYS.LIB/TESTDP.LIB/Z28IFS1P.FILE/Z28IFS1P.MBR'

Perhaps you haven't used OVRDBF before. Here is a very brief explanation. Here is a sample: OVRDBF FILEX FILEY This tells all programs that follow to use FILEY any time they refer to FILEX. If you have an RPG program that has FFILEX IPE..., when the program runs, OS400 will see that the program wants FILEX and change the reference to FILEY because of the override.

In the case of QSH, there is a built-in file called STDOUT. For our purposes, we can think of STDOUT as the terminal window. This is not very precise, but it'll do for now. Using the LS program as our example, you can think of LS as having an F spec like this: FSTDOUT O... So when you do LS -C blahblah, the LS program opens up STDOUT and does a WRITE to put the listing in that file. In your process, you don't want to send the LS output to that file -- you want it to go to some file in QTEMP. So you need an override.

The file you are overriding is the one on the F spec - in this case, the internal file STDOUT. The file you are sending it to is in QTEMP, in this case, QTEMP/Z28IFS1P.

Line 14800 needs to change to reflect that you are overriding STDOUT.
Line 14900 needs to just let the output go to STDOUT, that is, DON'T use any redirection at all.

When 14900 executes, LS will try to open STDOUT, but OS400 sees that 14800 has an OVRDBF for STDOUT, so instead of opening STDOUT, OS400 will open QTEMP/Z28IFS1P.

Hope that helps.

Good reading is any Unix/Linux primer (for redirection), and the Database Programming guide in the Infocenter (for file overrides.)
  --buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.