|
Methinks you are right. Seems to be the compiler forcing the all caps.subprocedure
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
into a SQL UDF and case does seem to matter on that. So, often anythingalso:
that might be picked up in that situation is often capitalized. See
http://faq.midrange.com/data/cache/185.htmlRow/Column
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
Sent by:languages,
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
UPPER and lower case has either somewhat strict meaning (Java) or thecase
is at least understood as standard for having somewhat of a meaning (offixed
course it is not strictly enforced). So there is something about the
format lines being in upper case (like the D or the PR) that really erksstrict
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
coding standards more than just a procedure definition, but oh well.constant
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
information just fine but I don't know how to relate it back to theare
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
intendedplease
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,
immediately advise the sender by reply email and delete all copies.contact
--
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
the sender. If the reader of this message is not the intended recipient,or
or the employee or agent responsible to deliver it to the intended
recipient, you are hereby notified that any dissemination, distribution
copying of this communication is strictly prohibited.contact
--
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
the sender. If the reader of this message is not the intended recipient,or
or the employee or agent responsible to deliver it to the intended
recipient, you are hereby notified that any dissemination, distribution
copying of this communication is strictly prohibited.list
--
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
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 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.