I use &libnam's all the time. I do not want my cl program suites being
fiddled with by other programmers.

e.g. I will use a core cl-program as an 'anchor', retrieve the programs
library (in a *LIBL contact) into &PRDLIB, and all calls to other CL
programs in the suite will use &PRDLIB. Also I then OVRDBF's to Display
files and workfiles, RTVDTAARA's ... this ties the product objects into a
set.

The standard I much prefer to see is plently of clear, meaningful comments
in the source-code.

I agree that hardcoding library names can be considered bad practice, but in
variables? - if it's done within a good design structure, well, it has
served me well for 20+ years.

My personal bad-taste in CL programming is the GOTO, badly used and with a
poor label-naming convention (if any) can make supporting the CL code a
nightmare. Wherever possible I use DO-ENDDO, but I'll use a GOTO without a
second-thought if the GOTO'ed Label can be seen on the same screen-full of
cl-code when I'm editing. When I can't, the GOTO has a comment saying where
it goes to.


Regards

Jeff Bull
iSeries Technical Consultant
NYCO Ltd - iSeries & AS/400 Automation Specialists
Tel: +44(0)20 8416 3778
Fax: +44(0)20 8416 3779
Mobile: +44(0)77 5692 3335
Email: jeff.bull@xxxxxxxxxx
Website: www.nyco.co.uk
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Carel Teijgeler
Sent: 26 April 2012 21:38
To: midrange-l@xxxxxxxxxxxx
Subject: Re: CL programming standards

- Error trapping

- CHKOBJ

- CLRPFM on workfiles

Regards,
Carel Teijgeler

*********** REPLY SEPARATOR ***********

On 26-4-2012 at 20:03 Stone, Joel wrote:

What are some of the CL programming standards that your shop has found
valuable?

I would think that a few standards are NEVER have the following in
production CL:

- never have a library name in CL (OK allow QTEMP)

- never have even a variable library name in CL

- never have a person's name or email address in CL (OK in author
comments)



Would a library in CL ever be necessary? I would think that good
coding would allow the *libl to do the work of choosing the correct lib
in almost all cases.

Comments and additional good practices?



______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs
Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.



-----
Geen virus gevonden in dit bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 10.0.1382 / Virusdatabase: 2411/4960 - datum van uitgifte:
04/26/12



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


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.