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



Ok, Specifying DFTACTGRP(*NO) in the H-Spec. compiled the module.

Thanks and Regards,

Luqman


"Chacko, Shepherd" <Shepherd.Chacko@xxxxxxxxxxx> 
wrote in message 
news:8BAE79192369FC46962151DFF9B3AC1701C50938@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Specify DFTACTGRP(*NO) in the H-Spec. It will compile.
>
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx 
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]  On 
> Behalf Of Luqman
> Sent: Monday, September 12, 2005 4:07 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: Creating a Function in RPG ?
>
> I have copied following code from Internet, but unable to compile.
> The error is:
> Keyword EXTPGM must be specified when DFTACTGRP(*YES) is
> specified on the CRTBNDRPG command.
>
> The Code is:
>
> 0001.00  * Prototype for procedure FUNCTION
> 0002.00 D FUNCTION        PR            10I 0
> 0003.00 D    TERM1                       5I 0 VALUE
> 0004.00 D    TERM2                       5I 0 VALUE
> 0005.00 D    TERM3                       5I 0 VALUE
> 0006.00 C                   EVAL      *INLR = *ON
> 0007.00 P Function        B
> 0008.00  *-------------------------------------------------------------
> 0009.00  * This procedure performs a function on the 3 numeric values
> 0010.00  * passed to it as value parameters.
> 0011.00  *
> 0012.00  * This illustrates how a procedure interface is specified for a
> 0013.00  * procedure and how values are returned from a procedure.
> 0014.00  *-------------------------------------------------------------
> 0015.00 D Function        PI            10I 0
> 0016.00 D    Term1                       5I 0 VALUE
> 0017.00 D    Term2                       5I 0 VALUE
> 0018.00 D    Term3                       5I 0 VALUE
> 0019.00 D Result          S             10I 0
> 0020.00  /free
> 0021.00     Result = Term1 ** 2 * 17
> 0022.00                  + Term2 * 7
> 0023.00                  + Term3;
> 0024.00     return Result * 45 + 23;
> 0025.00  /end-free
> 0026.00 P                 E
>
>
> Any idea please, what am I missing ?
>
> I want to create various User-Defined Functions in my SQLRPGILE programs,
> which should return values.
>
> Best Regards,
>
> Luqman
>
>
>
>
>
>
>
> -- 
> This is the RPG programming on the AS400 / iSeries (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 email and any files transmitted with it are confidential and are 
> intended solely for the use of the individual or entity to whom they are 
> addressed. This communication represents the originator's personal views 
> and opinions, which do not necessarily reflect those of CP Ships. If you 
> are not the intended recipient or the person responsible for delivering 
> the email to the intended recipient, be advised that you have received 
> this email in error, and that any use, dissemination, forward, printing, 
> or copying of this email is strictly prohibited. If you received this 
> email in error, please immediately notify the CP Ships Help Desk on +800 
> 27744771 if dialling from Europe, or 1800 388 4197 from US and Canada.
> Any personal data attached to or included in this email is being treated 
> in accordance with the provisions of the CP Ships Personal Data Protection 
> Policy, a copy of which is available upon request from the sender.  The 
> recipient must comply with the provisions of any data protection 
> legislation in force, in particular the requirement that they take 
> appropriate technical and organisational measures against unauthorised or 
> unlawful processing of this data."
>
>
> -- 
> This is the RPG programming on the AS400 / iSeries (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 ...

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.