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



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Ah, the CL wrapper solution is just fine with me! Thank you VERY much.

-----Original Message-----
From: Mark Waterbury [mailto:mark.s.waterbury@worldnet.att.net]
Sent: Monday, September 23, 2002 5:20 PM
To: midrange-l@midrange.com
Subject: Re: Receive COBOL RETURN-CODE in RPGLE


According to Chapter 2 of the CL Programming manual for V5R1,
it says:

"The return code cannot be tested directly by the user in the RPG IV
program."

I interpret this to mean that you would have to do one of:

1. write a small CL program (subroutine) to issue:

    RTVJOBA RTNCDE(&RTNCDE)

and return this value as a "parameter" to the ILE RPG caller, or

2. CALL the OS/400 API QUSRJOBI to request format JOBI0600,
which contains the "user return code".

Regards,

Mark S. Waterbury

----- Original Message -----
From: "Metz, Zak" <Zak_Metz@G1.com>
To: <midrange-l@midrange.com>
Sent: Monday, September 23, 2002 2:27 PM
Subject: RE: Receive COBOL RETURN-CODE in RPGLE


> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> --
> [ Picked text/plain from multipart/alternative ]
> I appreciate your response, Howard. In this case, the RETURN-CODE is a
COBOL
> "thing." I am familiar with communicating with COBOL from RPG using
> parms/linkage, but in this case it's an actual program return code rather
> than a parm we're passing back and forth. Here is a sample from the COBOL
> code:
>
> MOVE 99 TO RETURN-CODE
> STOP RUN
> .
>
> RETURN-CODE is not a defined variable, so I'm making a tiny assumption
that
> it's a reserved word and that somehow I can get the value in the calling
RPG
> program.
>
> (Similarly, in C your functions usually take parameters, but also can
return
> a value which the calling function can capture, and that is done all the
> time, which is why I'm baffled that I can't find how to do this between
RPG
> and COBOL on the 400.)
>
> -----Original Message-----
> From: Weatherly, Howard [mailto:Howard.Weatherly@dlis.dla.mil]
> Sent: Monday, September 23, 2002 4:23 PM
> To: 'midrange-l@midrange.com'
> Subject: RE: Receive COBOL RETURN-CODE in RPGLE
>
>
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> --
> [ Picked text/plain from multipart/alternative ]
> Is the RETURN-CODE var an RPG thing? cause usually in COBOL you pass
things
> like that as PARM values, so in Linkage Section there would be a level 1
(or
> some part of a level 1) that you would place a value in, the procedure
> division would look like Procedure Division Using 01-Name. (which would be
> the 01 name in Linkage). The COBOL program would do it's thing then set
some
> value in 01-Name and execute a GoBack. The RPG (Disclaimer, I am not an
RPG
> person) program would have a PARM list containing a positional value name
> representing the name 01-Name which would contain the return value.
>
> -----Original Message-----
> From: Metz, Zak [mailto:Zak_Metz@G1.com]
> Sent: Monday, September 23, 2002 4:13 PM
> To: 'midrange-l@midrange.com'
> Subject: Receive COBOL RETURN-CODE in RPGLE
>
>
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> --
> [ Picked text/plain from multipart/alternative ]
> I'm embarrassed to even ask this question, but I sure can't find the
answer.
>
> If I "CALL" a COBOL program from an RPGLE program, how do I capture the
> value that the COBOL program has returned using the RETURN-CODE variable?
> This is an unbound call.
>
> Seems, oh so simple...but the answer eludes me.
>
> TIA!
> NOTICE:  This E-mail may contain confidential information.  If you are not
> the addressee or the intended recipient please do not read this E-mail and
> please immediately delete this e-mail message and any attachments from
your
> workstation or network mail system. If you are the addressee or the
intended
> recipient and you save or print a copy of this E-mail, please place it in
an
> appropriate file, depending on whether confidential information is
contained
> in the message.
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> NOTICE:  This E-mail may contain confidential information.  If you are not
> the addressee or the intended recipient please do not read this E-mail and
> please immediately delete this e-mail message and any attachments from
your
> workstation or network mail system. If you are the addressee or the
intended
> recipient and you save or print a copy of this E-mail, please place it in
an
> appropriate file, depending on whether confidential information is
contained
> in the message.
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
NOTICE:  This E-mail may contain confidential information.  If you are not
the addressee or the intended recipient please do not read this E-mail and
please immediately delete this e-mail message and any attachments from your
workstation or network mail system. If you are the addressee or the intended
recipient and you save or print a copy of this E-mail, please place it in an
appropriate file, depending on whether confidential information is contained
in the message.



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.