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

Yes, I get all that - I accept that there are some inconsistencies in the
command names but it is remarkably consistent in general and stands up much
better to examination that the unix commands, as does the commonality of
parameters. Unix commands have little or no consistency whatsoever so
pointing out the relatively minor variations in OS/400 just isn't on the
same scale.

Using the command grouping menu and DLT* convention allows me to find the
appropriate command - the command grouping menu even gives me suggestions
about related commands. I have in-line help from a command key right down to
the parameter level on commands - much easier than running a man command and
having to wade through it.

At the command level, I can't see that it's a matter of taste - clearly the
OS/400 command structure and syntax is designed better and works better, the
major evidence being that it is relatively simple even for a beginner to
predict what a command will be once they grasp the basic rules. Compare that
to virtually having to learn or remember everything.

As to grep in CL (I guess this might be a trick question) I am unaware of an
equivalent and have not bothered going looking. Since there is no
STDIN/STDOUT piping in the standard QCMD shell it seems to me that grep
would be relatively useless, or at best extremely hobbled (but I'm open to
being educated). If I wanted to use grep I would work in QSHELL and have in
the past made good use of this.

Just to be clear, I'm in full agreement with you about the usefulness of
being able to pipe and filter and the power that grep and other utilities
add to that capability. I've often wished that we could pipe output from a
cl command to STDOUT rather than an outfile and use it as input for the next
command with some regexes thrown in for selection processing on the way, but
sadly OS/400 doesn't provide that in the QCMD shell.

But at that point you are confusing the usefulness of the shell with the
command syntax (IMO) and they are vastly different creatures - and that was
actually the point of my previous email.

Again, going back to your earlier script example - don't you think a less
terse example might help the next guy no matter how attractive or cool it is
to use the shorter format to demonstrate that you know the switches ? Why
force the next guy to (potentially) go check the manpage when the longer
example might prevent this ? As I asked earlier, would you accept
programmers doing the same thing in a HLL ? What makes it OK in a shell
script ?

Yes, they are two very different systems with very different philosophies -
like a lot of things I think it depends where you started as to where your
preference lies. I really like OS/400 but that doesn't blind me to the
things it is missing or doesn't do well. Equally, just because it doesn't do
some things so well doesn't mean it does everything badly.

Regards
Evan Harris


-----Original Message-----
Perhaps it's just a matter of taste, then. I was introduced to the S/38
in 1981, and continued to work in that arena on and off for the next 22
years. By my informal count, there are currently more than 2100 CL
commands, including about 30 commands for copying alone. Some commands
are specific to certain object types, others take the object type as a
parameter. Some things you DLT (123), others you RMV (126).

Sure, there is that 3 character verb convention that's universal to CL
commands. Except for commands like MD, ERASE, EXPORT, and ROLLBACK. All
of that has to be learned one way or the other.

In the Unix environment, I can use the apropos command to search for an
appropriate command to use, then use the man command to read the manual
page for it. Unlike i5/os, most commands output to stdin, and so can be
piped into other commands. (For example, to count the number of CL
commands, I piped the output of grep into wc.) Sure, the names can be
cryptic. But names like "grep" are part of the Unix programmers'
vocabulary. Likewise, all of this has to be learned too, one way or the
other.

Clearly, these are two very different systems, with very different
philosophies, each with its own rich history.

(BTW, what's the CL command equivalent to grep?)

Cheers! Hans




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.