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



Yeah, well....I disagree with you Rob, but each to their own. By the way,
who cares about "valuable real estate" in an OS/400 source member?  It's not
like you're likely to run out of memory any time soon because you happened
to code a full-syntax DCL statement, is it?

However, I need to have some consistency in our CL code so that I can write
a program to analyze it and extract the variables used in the PGM PARM list,
and then get those variable types and lengths, which I'm then storing in a
database for another application to use.

If I don't have consistency, then it's hard to figure out where a variable
definition begins and ends. Especially considering that you can have the
variable definition run across multiple source lines, if a programmer had
coded it that way (it happens).  If I know that each DCL statement has the
same format (i.e., DCL VAR() TYPE() LEN() ) then it's a lot easier to find
the information I need, regardless of how many actual source lines it may
span.

Of course...if I had the option of coding this source analyzer in another
language besides RPGIV, say VB, then this wouldn't be near the chore it is
at the moment.

But since this has to be code that the "old fogeys" ha! in our shop can read
and understand also....I'm forced into trying to fit a square peg into a
round hole on this by using RPG.



Shannon O'Donnell


----- Original Message -----
From: <rob@xxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Wednesday, May 07, 2003 1:43 PM
Subject: Re: Batch Formatting of CL Code


> Let me know so I can make sure that we NEVER get it here!  I think adding
> all that VAR... TYPE..., LEN... stuff is a waste of real estate.  I much
> prefer:
>     DCL  &APOS        *CHAR   1  /* Apostrophe                       */
>     DCL  &PARM1       *CHAR   2  /*                                  */
>     DCL  &PARM2       *DEC    2  /*                                  */
>
> Rob Berendt
> --
> "They that can give up essential liberty to obtain a little temporary
> safety deserve neither liberty nor safety."
> Benjamin Franklin
>
>
>
>
> "Shannon O'Donnell" <sodonnell@xxxxxxxxxxxxxxx>
> Sent by: midrange-l-bounces@xxxxxxxxxxxx
> 05/07/2003 10:39 AM
> Please respond to Midrange Systems Technical Discussion
>
>         To:     "Midrange Systems Technical Discussion"
> <midrange-l@xxxxxxxxxxxx>
>         cc:
>         Fax to:
>         Subject:        Batch Formatting of CL Code
>
>
>
> I remember seeing a tip or utility somewhere a few years ago that would
> take
> in a CL program source member and format the DCL statements to make them
> all
> consistent.  For example, if you had lines such as:
>
>  DCL   &MYVAR  *DEC 10 2
>  DCL   &MYVAR2 *CHAR 11
>
> It would format it as:
>
> DCL  VAR(&MYVAR) TYPE(*DEC) LEN(10 2)
> DCL VAR(&MYVAR2) TYPE(*CHAR) LEN(11)
>
> Does anyone remember this or have access to that utility or something
> similar?  I need to format a bunch of CL source members.
>
> Thanks!
>
> Shannon O'Donnell
>
>
>
>
> _______________________________________________
> 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.cgi/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.
>
>
> _______________________________________________
> 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.cgi/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 ...

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.