Calling a non-COBOL program from a COBOL program on OS/390 
Author Message
 Calling a non-COBOL program from a COBOL program on OS/390

  I have a desire to call a non-COBOL (compiled REXX) program from a
COBOL program on the OS/390 (IBM MVS/TSO) platform.

  Does anyone have experience with this?

  When I run my COBOL program it gives me an error that basically says
it can't find my REXX program.  I believe the system is looking in the
same PDS as the COBOL program resides.

  The REXX program I have has been compiled, but since the RECFM (Record
Format) of the COBOL PDS is 'U', I can't compile the REXX program to it
(the REXX compiler what's a RECFM of 'FB' [Fixed Block]).

  I tried adding a SYSEXEC DD to my JCL to point to my PDS with the
compiled REXX program, but this didn't work out either.

  I would greatly appreciate any help I can get.  I don't think this is
a REXX specific problem, so if you have done this in another language
(ie. 'C', JAVA, etc).  Please feel free to respond.

TIA,

Dave C.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 02 Mar 2003 01:42:37 GMT  
 Calling a non-COBOL program from a COBOL program on OS/390

Quote:

>  I tried adding a SYSEXEC DD to my JCL to point to my PDS with the
>compiled REXX program, but this didn't work out either.

>  I would greatly appreciate any help I can get.  I don't think this is
>a REXX specific problem, so if you have done this in another language
>(ie. 'C', JAVA, etc).  Please feel free to respond.

I'm not exactly sure if this applies or not, but we are able to call
PL/1, Assembler, and COBOL from COBOL programs.  I believe that
all the 'called' modules that we use must be in the 'look-aside' library
or we point to a specific 'extra' list via JOBLIB/STEPLIB type override
cards.

One other thing to consider is how was the program compiled?
Was it compiled with static or dynamic linking?
Static linking would imply that the code is bound in during the
Link edit phase and the Linkage editor must be able to locate
the REXX program.



Sun, 02 Mar 2003 07:21:45 GMT  
 Calling a non-COBOL program from a COBOL program on OS/390
It IS a REXX specific problem. As you remarked, a 'compiled' REXX is not
really compiled, but rather sort of pre-processed. It has not the
load-module format an cannot be called directly.
Call IRXJCL or IRXEXEC providing them with the name of the REXX EXEC you
want to use as parameter.
It does not matter whether the REXX is compiled or not, the call is the
same.
Refer to chapter '12.2.1.2  Invoking IRXJCL From a REXX Exec or a
Program' in the manual 'OS/390 TSO/E REXX Reference', Document Number
SC28-1975-03, Program Number 5647-A01. You can access this manual at:
http://www.s390.ibm.com:80/bookmgr-cgi/bookmgr.cmd/BOOKS/IKJ3A330/CCONTE
NTS?SHELF=IKJOSE30


Quote:

>   I have a desire to call a non-COBOL (compiled REXX) program from a
> COBOL program on the OS/390 (IBM MVS/TSO) platform.

>   Does anyone have experience with this?

>   When I run my COBOL program it gives me an error that basically says
> it can't find my REXX program.  I believe the system is looking in the
> same PDS as the COBOL program resides.

>   The REXX program I have has been compiled, but since the RECFM
(Record
> Format) of the COBOL PDS is 'U', I can't compile the REXX program to
it
> (the REXX compiler what's a RECFM of 'FB' [Fixed Block]).

>   I tried adding a SYSEXEC DD to my JCL to point to my PDS with the
> compiled REXX program, but this didn't work out either.

>   I would greatly appreciate any help I can get.  I don't think this
is
> a REXX specific problem, so if you have done this in another language
> (ie. 'C', JAVA, etc).  Please feel free to respond.

> TIA,

> Dave C.

> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
Daniel
------------------------------------------------------------
visit us at:
http://www.winterthur.com

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 03 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. OS/390 Cobol - return codes in Re-entrant programs

2. Cobol OS/390 to C OS/390 V2R6

3. COBOL II calls to OS/VS COBOL programs in batch

4. Cobol 390 2.2 and Cobol Z/Os 3.1

5. COBOL TO C STATIC CALL ON OS/390.

6. Execute non cobol program from cobol source

7. Execute non cobol program from cobol source

8. Calling OS/2 DLLs from a cobol program

9. Call HLASM program from COBOL MVS program

10. In search of a PL/I - COBOL for OS/390 comparison

11. In search of a PL/I - COBOL for OS/390 comparison

12. In search of a PL/I - COBOL for OS/390 comparison

 

 
Powered by phpBB® Forum Software