On Tue, 19 Nov 2002, Peter Dow wrote:

> cat /qsys.lib/mylib.lib/mysrcf.file/mysrc.mbr
>
> works just fine, displaying the source member on the display.
>
> Both
>
> cat /qsys.lib/mylib.lib/myfile.file
>
> and
>
> cat /qsys.lib/mylib.lib/myfile.file/myfile.mbr
>
> where myfile is a data physical file, get an "Operation not supported."
> error when trying to open the file.

Well that isn't how a unix person would expect it to work.  As Hans said,
cat doesn't care what the file is, it just opens it and reads it.  While I
suppose there is an argument to be made that the AS/400 way is how cat
should work (i.e. not opening files that don't make sense to show on the
display) it is inconsistent with the way cat works on every other system.
A unix person might choose to do this instead of DSPPFM:

cat /qsys.lib/mylib.lib/myfile.file/member.mbr | more

But if cat won't open the dang file that is never a possibilty.

Before too many people clamor that the cat method is a stupid replacement
for DSPPFM, remember that there is an easy way to view new records *as
they are added* to the database using unix tools (if the AS/400 used the
tools correctly).  On unix you can do:

tail -f /the/file/you/want/to/watch

this works on binary or any type of file.  It just prints on the screen
the "tail" end of the file.  The '-f' makes new entries to the print to
the screen as they happen.  There is no way to do this on the AS/400.  You
can use DSPPFM and go to the bottom, then exit, then do it again, etc.
But it is not the same ability.  If the AS/400 let cat, tail, etc. work
like they do on other systems then what I describe above would become a
possibilty.

James Rich



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.