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



Michael

If you use RDP for editing CL, you can change how it handles that - you can turn off auto uppercase, along with several other settings. You can have your code start farther to the left, you can have it indented for conditioned code blocks, etc.

I see you did mention prompting in SEU - I find myself doing production work less and less in SEU, since it demolishes the "nice" (IMO) styling I got in RDP.

Vern

On 5/29/2012 9:50 AM, Michael Ryan wrote:
The problem I have is that when I prompt a command (in SEU) in CL
program source, the command is returned upper cased. So I would have
to retype the command to get lower or title case. And I don't like to
have some upper case and some title case, so I just stay with upper
case.

On Tue, May 29, 2012 at 10:47 AM, Glenn Hopwood<ghopwood.list@xxxxxxxxx> wrote:
I prefer your first example and it's the convention that I follow for
new code or in source members that are already in that format. If I have
to make a change to a source member that uses the 'prompted' format then
I will follow that convention.

Glenn

On 5/29/2012 10:36 AM, Stone, Joel wrote:
When you create CL code, do you try to make it easy to read ie use lower case; add some white space, skip keywords such as COND and VAR and THEN, and line things up?

Like this:

select
when (&reportID = 'LS') goto report_LS
when (&reportID = 'SR') goto report_SR
when (&reportID = 'SB') goto report_SB
otherwise goto endpgm
endselect

report_LS:
chgvar&TITLE1 'New Customer Report'
chgvar&TITLE2 'Trader Notification'
chgvar&SHOWCUST 'N'
chgvar&QRYSLT (&QRYSLT *bcat ' ASHPSTS = +
"UT" *and ASLSCNT = 0 *and ACTMDTR = "R"')


******************************************************
Or
******************************************************

Do you run everything thru the prompter, like this:

select
WHEN COND(&REPORTID = 'LS') THEN(GOTO +
CMDLBL(REPORT_LS))
WHEN COND(&REPORTID = 'SR') THEN(GOTO +
CMDLBL(REPORT_SR))
WHEN COND(&REPORTID = 'SB') THEN(GOTO +
CMDLBL(REPORT_SB))
OTHERWISE CMD(GOTO CMDLBL(ENDPGM))
ENDSELECT

report_LS:
CHGVAR VAR(&TITLE1) VALUE('Loaded Cars Available +
for Sale')
CHGVAR VAR(&TITLE2) VALUE('Trader Notification')
CHGVAR VAR(&SHOWCUST) VALUE('N')
CHGVAR VAR(&QRYSLT) VALUE(&QRYSLT *BCAT ' ASHPSTS = +
"UT" *and ASLSCNT = 0 *and ACTMDTR = "R"')


Which method is preferred or more widely used?

I always do the former (mixed case, skip keywords).
A co-worker goes thru my code and prompts it all into the harder-to-read (imo) ALL CAPS stuff.

Is this following IT etiquette?

I realize people alter other's code over the years. But this is happening prior to initial promotion.

Does such an etiquette concept exist in the IT development field?




______________________________________________________________________
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.


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.