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



The RPG compiler uppercases everything, (take a look at the
cross-reference section of the compile listing, or your binder source)

So by default, if you don't have the EXTPROC keyword, the procedure
name is in ALL CAPS.

If you want the procedure name to be mixed case, you have to specify
the mix-case name in quotes using EXTPROC like so:
d MyProcedure pr extproc('MyProcedure')

p MyProcedure b export
d MyProcedure pi
/free
return;
/end-free
p MyProcedure e


Module . . . . . . . . . . . . : TESTRPGLE
Library . . . . . . . . . . : CTSC_W
Detail . . . . . . . . . . . . : *EXPORT
Module attribute . . . . . . . : RPGLE

Exported defined symbols:

Symbol Name Symbol Type
MyProcedure PROCEDURE


Note that if you use binder source, the procedure name would be mixed
case there also.

HTH,
Charles



On Mon, Jun 1, 2009 at 11:09 AM, <rob@xxxxxxxxx> wrote:
Methinks you are right.  Seems to be the compiler forcing the all caps.
Case on
DSPSRVPGM SRVPGM(ROUTINES/SRVPGM) DETAIL(*PROCEXP)
differs from the PR, PI and P case.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
RNewton@xxxxxxxxxxxx
To:
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date:
06/01/2009 10:59 AM
Subject:
Re: Sub procedure end specification
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



Rob,

When creating UDF's or External Stored Procedures the case is only
sensitive in the SQL definition because of the RPG compiler forcing
everything to uppercase. This does not mean that your actual source for
the
RPG must be all UPPER case. For example see the code below:

Here is the SQL procedure:

  CREATE PROCEDURE
    &library/sp_Pickup_handleStatusChange (
          IN    request        DECIMAL (10),
          IN    oldStatus      CHAR (1),
          IN    newStatus      CHAR (1),
          INOUT error          DECIMAL (2)
        )
  RESULT SETS
    1
  LANGUAGE
    RPGLE
      SPECIFIC
        &library/PKP10S000A
  EXTERNAL NAME
    '&library/PKP10S000(PICKUP_HANDLESTATUSCHANGE)'
  PARAMETER STYLE
    GENERAL
  NOT DETERMINISTIC
  READS SQL DATA
  RETURNS NULL ON NULL INPUT
      NOT FENCED


And here is the RPG procedure that it calls:

     // Procedure Interface
     //////////////////////////////////
    d Pickup_HandleStatusChange...
    d                 pi
    d  pr_request                         like(pkp101.phrqst) const
    d  pr_oldStatus                       like(pkp101.phstat) const
    d  pr_newStatus                       like(pkp101.phstat) const
    d  pr_error                      2p 0


"Comments like the following "...of more modern..." may reduce your
response rate. Or start cluttering up the list with testosterone..."

Not sure how to respond to that. Thanks for the tip, I guess.


PS - I replied with the wrong subject line before so I put it back into
the
right thread now.

Thanks,
Robert Newton
EDPS
Electronic Data Processing Services
System Owner
804-353-1900 x2256
rnewton@xxxxxxxxxxxx



 From:       rob@xxxxxxxxx

 To:         RPG programming on the IBM i / System i
<rpg400-l@xxxxxxxxxxxx>

 Date:       06/01/2009 09:54 AM

 Subject:    Re: QDFRTVDB (Retrieve Display File Information)- Constants
and   Row/Column

 Sent by:    rpg400-l-bounces@xxxxxxxxxxxx






There are some areas of case sensitivity.  You can make a RPG subprocedure
into a SQL UDF and case does seem to matter on that.  So, often anything
that might be picked up in that situation is often capitalized.  See also:
http://faq.midrange.com/data/cache/185.html

Comments like the following "...of more modern..." may reduce your
response rate.  Or start cluttering up the list with testosterone...

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
RNewton@xxxxxxxxxxxx
To:
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date:
05/29/2009 05:45 PM
Subject:
Re: QDFRTVDB (Retrieve Display File Information)- Constants and Row/Column
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



I'm what you would probably consider a "new school" RPG guy coming from a
background of more modern object oriented and C syntactical languages. I
only started writing in RPG about 5 years ago. In those C style languages,
UPPER and lower case has either somewhat strict meaning (Java) or the case
is at least understood as standard for having somewhat of a meaning (of
course it is not strictly enforced). So there is something about the fixed
format lines being in upper case (like the D or the PR) that really erks
me. It attracts attention to the less important parts of the code, in my
opinion.

Take the example below. If UPPER CASE attracts attention, then if you are
scanning a 10k line module full of procedures, what stands out? In my
opinion, its everything but the important part, the procedure name, but I
guess I could chalk that up to being so used to my own standard. Then
there's the over crowding... let  the code breathe some; it's much easier
to digest later.

    D*--------------------------------------------------
    D* Procedure name: ProcedureName
    D* Purpose:        Purpose of this procedure
    D* Returns:        Return indicator for success or failure
    D* Parameter:      parameter1 => This is parameter number 1
    D*--------------------------------------------------
    D ProcedureName   PR              N    EXTPROC(EXTERNALPROCEDURENAME)
    D  parameter1                   32A   CONST

That is why I use snippets rather than the wizards, because I can really
have a higher level of control over how I present my source.

As you can see, I am pretty picky when it comes to my source code though,
so I figure I must be the minority. If I can take anything from the
feedback of the shop I work in, my level of scrutiny over it is more than
is usually in RPG shops, at least from their experience. The wizards are
great for those who don't mind StuFF BeING IN Caps aLl OVER the place
deTraCTinG fROM thE mesSAgE, but I prefer using case to imply and attract
attention to more important areas of the source code.

Sorry for getting off topic a bit here. I guess I am venturing into strict
coding standards more than just a procedure definition, but oh well.

Thanks,
Robert Newton
EDPS
Electronic Data Processing Services
System Owner
804-353-1900 x2256
rnewton@xxxxxxxxxxxx



 From:       Zachary Johnson <ZJohnson@xxxxxxxxxxxxx>

 To:         "rpg400-l@xxxxxxxxxxxx" <rpg400-l@xxxxxxxxxxxx>

 Date:       05/29/2009 03:59 PM

 Subject:    QDFRTVDB (Retrieve Display File Information)- Constants and
Row/Column

 Sent by:    rpg400-l-bounces@xxxxxxxxxxxx






Hello all,

I'm having some difficulty figuring out how to get to the Row/Column
information for the constant fields with QDFRTVFD.  I can get the constant
information just fine but I don't know how to relate it back to the
Row/Column table. Does anybody have an example I could use?
I've been looking at it so long that I have lost touch with reality.

~Zach

NOTICE: This electronic mail message and any files transmitted with it are
intended
exclusively for the individual or entity to which it is addressed. The
message,
together with any attachment, may contain confidential and/or privileged
information.
Any unauthorized review, use, printing, saving, copying, disclosure or
distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






This communication and any transmitted documents are intended to be
confidential. If there is a problem with this transmission, please contact
the sender. If the reader of this message is not the intended recipient,
or the employee or agent responsible to deliver it to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






This communication and any transmitted documents are intended to be
confidential. If there is a problem with this transmission, please contact
the sender. If the reader of this message is not the intended recipient,
or the employee or agent responsible to deliver it to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.