IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to call a cobol program from REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
blackzero

New User


Joined: 20 Mar 2008
Posts: 6
Location: INDIA

PostPosted: Tue Jul 08, 2008 10:04 pm
Reply with quote

Hi,

I need to call a cobol program from a rexx program. I tried the option ADDRESS LINKPGM 'PGM-NAME' but its not working. When i try to the rexx it errors

1. REXX code is in the PDS ABC.REXX
2. COBOL code is in the PDS ABC.COBOL
3. COBOL LOAD module is in the PDS ABC.LOAD

Please suggest me if there is any way to do it.

Can you please provide me the complete REXX code for this.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Jul 08, 2008 10:11 pm
Reply with quote

Quote:
When i try to the rexx it errors

More details?

How about?:
Code:
Address TSO "CALL 'ABC.LOAD(PGM-NAME)' "
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jul 08, 2008 10:14 pm
Reply with quote

You can try LIBDEF ISPLLIB followed by SELECT PGM.

O.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jul 08, 2008 11:32 pm
Reply with quote

I have found that Address LINKMVS always works well when the exec is running in a non-TSO/E address space:
Code:

/* REXX */
Address LINKMVS "MYPROG PARAMETERS"
Back to top
View user's profile Send private message
blackzero

New User


Joined: 20 Mar 2008
Posts: 6
Location: INDIA

PostPosted: Wed Jul 09, 2008 4:53 pm
Reply with quote

Thanks everyone

Code:

Address TSO "CALL 'ABC.LOAD(PGM-NAME)' "


can be used to call the module

Thanks again.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top