|
On Fri, 22 Nov 2002, jt wrote: > ("variable character data, as well as graphic, bitmap and all that..." was > intended to imply (somehow?...;-), "*VARCHAR, DBCS, audio/video and what-all > via links...") So what I was wondering was whether there are fundamental > differences between text files that *nix commands work best on, and a > variable character fields in DB2. There are fundamental differences. I'm not sure that your question was answered completely. The difference is that one is a text file and one is a database file. That the database file may contain text is irrelevant - the file itself is a database file. So in order to treat a variable length character field in a database file as a text file the command/program would need some knowlege about the database and the file. unix commands don't have any such knowlege. They are purposely designed that way. Think about it: designing programs to have knowlege about the data they are reading actually limits their flexibility. It can also decrease their applicability to specific situations. grep can be used to find the occurence of a string in anything, whether that be a filename, directory, text file, binary file, or whatever. But it can't be used to show you what paragraph a string occurs in, much less let you edit that paragraph. You need a word processor or text editor for that. Because grep has no knowlege about file layouts or other specifications it can be used on anything to find a string. And because a word processor has knowlege about document layouts they are pretty much limited to reading and writing documents. So most unix commands are kept general on purpose so that they can be flexible. This is where I feel IBM has messed up. Apparently you can't use the general unix commands on database files. This goes against the design of the commands. They should have no knowlege of what they are reading, they just read it. It doesn't matter if the results are not human readable, they still do their job. You might be interested in looking for a copyright string in all your executables. The unix commands if implemented as designed would allow you to do this. You may have some knowlege about some file that no other program does. You can write a program with this knowlege and use it together with the generic unix commands to produce meaningful results. So unix commands are designed with flexibility in mind. This doesn't necessarily make them better or worse that OS/400 commands, just a different paradigm. And while flexibility may be one more rope to hang yourself with, it may also be the rope that pulls you out of the quicksand. James Rich
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.