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



can someone give me a hint where i can specify which return code will be given 
back by an rpg program. that would do the task in my case.

> -----Ursprüngliche Nachricht-----
> Von: Igor.Beslic@xxxxxxxxxxxx [mailto:Igor.Beslic@xxxxxxxxxxxx] 
> Gesendet: Donnerstag, 8. April 2004 08:38
> An: RPG programming on the AS400 / iSeries
> Betreff: Re: return value of a rpg program
> 
> 
> When I want my rpg program return some result to calling 
> program I use 
> PLIST/PARM operations at begining of program. Parameters 
> specified with 
> PARM operation can be output or input, dependes how is your calling 
> program configured.

AFAIK this is not fully correct. parameter are passed by reference and though 
when these variables are modified, the calling program can access the modified 
value. no value from the plist is given back. but thanx for the response.

> 
> Example of defining parameters in called program:
> 
> C     *ENTRY        PLIST
> C                              PARM                    parameter1 256
> C                              PARM                    parameter2 256
> C                              PARM                    parameter3 256
> .
> .
> .
> C                              PARM                    parameterN 256
> 
> This way works fine with CL and RPG calling programs. Maybe 
> it will work 
> with perl?? You can find more details abouth it in IBM's RPG reference
> Regards, 
> 
> Igor Bešlić, dipl. ing. rač. 
> Zelinska 2, 10000 Zagreb
> e-mail: Igor.Beslic@xxxxxxxxxxxx
> 
> 
> 
> 
> "Knezevic, Mihael" <m.knezevic@xxxxxxxx>
> Sent by: rpg400-l-bounces@xxxxxxxxxxxx
> 07.04.2004 15:19
> Please respond to RPG programming on the AS400 / iSeries
> 
>  
>         To:     <rpg400-l@xxxxxxxxxxxx>
>         cc: 
>         Subject:        return value of a rpg program
> 
> 
> hi,
> 
> is it possible in rpg to return a value from a program. i 
> don't mean to
> get a return value of a procedure.
> 
> i like to do something in perl like this:
> 
> $myvar = `system myrpgprogram`;
> 
> but i don't know how i should define my prototype in the rpg program.
> the rpg program name is BS_SUBS. it tried it like this: 
> 
> DMain             PR            10A   EXTPGM('BS_SUBS') 
> D  subname                      10A 
> D  sublib                       10A 
>  * 
>  *Entry list (parameter) 
> DMain             PI            10A 
> D  subname                      10A 
> D  sublib                       10A 
> 
> but it says that a return value is not supported with EXTPGM key word.
> 
> thanx in advance for any help.
> 
> mk
> 
> _______________________________________________
> 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 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.