×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi Rob,

After adding your lines, following error occured.

 The NOMAIN keyword is not valid when the CRTBNDRPG command is
 used to create a program.

Any idea please ?

I am working on AS/400.

Best Regards,

Luqman




<rob@xxxxxxxxx> wrote in message 
news:OF49F32831.24C44D45-ON0525707A.006FF684-0525707A.00701DD0@xxxxxxxxxxxx
>     H NOMAIN
>     H ActGrp(*CALLER)
>     H DftActGrp(*NO)
> http://faq.midrange.com/data/cache/185.html
>
> Rob Berendt
> -- 
> Group Dekko Services, LLC
> Dept 01.073
> PO Box 2000
> Dock 108
> 6928N 400E
> Kendallville, IN 46755
> http://www.dekko.com
>
>
>
>
>
> "Luqman" <luqman@xxxxxxxxxxxxxxxx>
> Sent by: rpg400-l-bounces@xxxxxxxxxxxx
> 09/12/2005 03:06 PM
> Please respond to
> RPG programming on the AS400 / iSeries 
> <rpg400-l@xxxxxxxxxxxx>
>
>
> To
> rpg400-l@xxxxxxxxxxxx
> cc
>
> 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 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 ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.