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



"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 05/10/2016 10:59:51 AM:
----- Message from dlclark@xxxxxxxxxxxxxxxx on Mon, 9 May 2016 14:
26:51 -0400 -----

To:

Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries <wdsci-l@xxxxxxxxxxxx>

Subject:

Re: [WDSCI-L] New RFE--an option for formatting DCL statements in RDi

"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 05/09/2016 02:19:17
PM:
How would the following declaration look? (ugly but valid)

DCL VAR(&DS1) TYPE(*CHAR) LEN(1000)
DCL VAR(&DS2) TYPE(*CHAR) LEN(1000)
DCL VAR(&NOTSTORAGE) TYPE(*DEC) LEN(15 0)
DCL VAR(&FIELD1.1) TYPE(*CHAR) STG(*DEFINED) +
LEN(512) DEFVAR(&DS1)
DCL VAR(&FIELD2.1) TYPE(*CHAR) STG(*DEFINED) +
LEN(512) DEFVAR(&DS2)
DCL VAR(&FIELD1.2) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&DS1)
DCL VAR(&FIELD2.2) TYPE(*CHAR) STG(*DEFINED) +
LEN(150) DEFVAR(&DS2)
DCL VAR(&FIELD1.3) TYPE(*CHAR) STG(*DEFINED) +
LEN(150) DEFVAR(&DS1)
DCL VAR(&FIELD2.3) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&DS2)

I know what you're implying and I thought if that, too, but
didn't
say anything. You're correct that it would look like this and not be
very
helpful.

DCL VAR(&DS1) TYPE(*CHAR) LEN(1000)
DCL VAR(&DS2) TYPE(*CHAR) LEN(1000)
DCL VAR(&NOTSTORAGE) TYPE(*DEC) LEN(15 0)
DCL VAR(&FIELD1.1) TYPE(*CHAR) STG(*DEFINED) +
LEN(512) DEFVAR(&DS1)
DCL VAR(&FIELD2.1) TYPE(*CHAR) STG(*DEFINED) +
LEN(512) DEFVAR(&DS2)
DCL VAR(&FIELD1.2) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&DS1)
DCL VAR(&FIELD2.2) TYPE(*CHAR) STG(*DEFINED) +
LEN(150) DEFVAR(&DS2)
DCL VAR(&FIELD1.3) TYPE(*CHAR) STG(*DEFINED) +
LEN(150) DEFVAR(&DS1)
DCL VAR(&FIELD2.3) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&DS2)
. . .
. . .
. . .

Yep. Ugly code would still be ugly. (Kind of like GIGO--Garbage In,
Garbage Out. I guess we could call it UIUO.) But even in the above ugly
state, it still serves the purpose of immediately showing that the
declares are STG(*DEFINED).

I think you have to admit, Dave's prettying up of the code below is very
nice with the indents:

DCL VAR(&DS1) TYPE(*CHAR) LEN(1000)
DCL VAR(&FIELD1.1) TYPE(*CHAR) STG(*DEFINED) +
LEN(512) DEFVAR(&DS1)
DCL VAR(&FIELD1.2) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&DS1)
DCL VAR(&FIELD1.3) TYPE(*CHAR) STG(*DEFINED) +
LEN(150) DEFVAR(&DS1)
DCL VAR(&DS2) TYPE(*CHAR) LEN(1000)
DCL VAR(&FIELD2.1) TYPE(*CHAR) STG(*DEFINED) +
LEN(512) DEFVAR(&DS2)
DCL VAR(&FIELD2.2) TYPE(*CHAR) STG(*DEFINED) +
LEN(150) DEFVAR(&DS2)
DCL VAR(&FIELD2.3) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&DS2)
DCL VAR(&NOTSTORAGE) TYPE(*DEC) LEN(15 0)

Michael Quigley
Computer Services
The Way International
www.TheWay.org

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.