×
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.
I use the CL prompter heavily, so that kind of predicates how CL looks.
However, I do like to see CL indented. Years ago the late Ernie Malaga
of MC Press wrote a REXX based reformatting command the did a really
nice job of indenting. (The only issue I has with it was that right
hand comments tended to wrap when indented and spoiled the layout. I
solved this for my code by not using right hand comments.)
The caveat was that the CL needed to be fully prompted with the
keywords, but since I prompt everything, it worked great for me.
I'm not a REXX expert, but I did manage to bring Ernie's program up to
(mostly) V5R4 syntax, (Though frankly, I'm not real happy with the way I
made the changes.)
Where I am now we are at V7R1, with a wide selection of inherited code
styles from 20 years of in-house development, so I've tended not to use
it. And I try not to write particularly complicated CLs anyway, but
there are times when I will indent a temporary copy of an existing
program just to re-assure myself that I am understanding the syntax.
Others have said that RDi and RDP do a better job of indenting. They
are slower than SEU, but they do cache commands, so over time you may
find they speed up. However, I still don't think they indent as well as
Ernie's REXX program did.
I believe that iSeries Network has a style guide, largely without
keywords, that they follow for published code. But if you use the
prompter it is an awful lot of work to reformat your code to this
standard. Maybe they have a reformatting program that they use?
Sam
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: CL code formatting and programming etiquette, (continued)
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.