MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rexx and C on mainframe

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
zatlas
Beginner


Joined: 17 Dec 2002
Posts: 43
Topics: 4

PostPosted: Mon Jul 18, 2011 6:08 am    Post subject: Rexx and C on mainframe Reply with quote

I am new to Rexx and mainframe Rexx, but I need to learn fast.
Please point me to the correct documentation or guide me.
I need to call programs that are coded in C from mainframe Rexx in z/OS (NOT using Unix Services.)

Is there a way to call C program directly from Rexx? [i.e. CALL xxx or rc=xxx()] If so how is it done?

If not what would be the standard so I can issue "XXX ()" and access the result or same question with using ADDRESS.

Thanks
ZA
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Jul 18, 2011 10:14 am    Post subject: Reply with quote

zatlas,

Try this Calling C functions from Rexx

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Jul 18, 2011 1:17 pm    Post subject: Reply with quote

I'm curious, how is a program coded in 'C' different from other programs coded in languages like COBOL or PLI or Assembler?
Back to top
View user's profile Send private message
zatlas
Beginner


Joined: 17 Dec 2002
Posts: 43
Topics: 4

PostPosted: Mon Jul 18, 2011 3:50 pm    Post subject: Reply with quote

Thanks
Kolusu, I specifically need mainframe, z/OS, no Unix services (good ol' Rexx)!

Superk, yes it is not different. Please guide me to how to do it in any z/os native language and I will be good. When I say guid me, I mean point me to the correct book/chapter or article. I will do the rest.

ZA
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Jul 18, 2011 4:47 pm    Post subject: Reply with quote

Suggest you ask others who use your system to show you a couple of examples of existing rexx calling COBOL or Assembler modules.

What you need to do will be very similar. . .

At run time, the system does not care much about the source language. A proper load module should work with no problems. Possibly a good first test is the popular "Hello World" program.

There may be prior topics in the forum that can help. Here is one:
http://www.mvsforums.com/helpboards/viewtopic.php?t=8020
_________________
All the best,

di
Back to top
View user's profile Send private message
zatlas
Beginner


Joined: 17 Dec 2002
Posts: 43
Topics: 4

PostPosted: Mon Jul 18, 2011 11:15 pm    Post subject: Reply with quote

Hi Papadi
Unfortunately, there is no one here to help me, a remote lowly consultant. On the other hand the link-chain you've mentioned, seems to be very interesting. I will try it within a short time.
thank you
ZA
Back to top
View user's profile Send private message
rlilley
Beginner


Joined: 05 Apr 2010
Posts: 19
Topics: 3

PostPosted: Tue Jul 19, 2011 4:38 am    Post subject: Reply with quote

Here are a couple examples of how I call my C programs from REXX code

if running under ISPF:

address ispexec "SELECT PGM(Cpgmname) PARM(pgmparms)"

using LINKMVS:

ADDRESS LINKMVS 'Cpgmname' P1 P2 P3 P4
Back to top
View user's profile Send private message
zatlas
Beginner


Joined: 17 Dec 2002
Posts: 43
Topics: 4

PostPosted: Tue Jul 19, 2011 8:19 am    Post subject: Reply with quote

Thank you all
ZA
Back to top
View user's profile Send private message
asr2
Beginner


Joined: 25 Jun 2011
Posts: 26
Topics: 4
Location: Germany

PostPosted: Fri Jul 22, 2011 2:46 am    Post subject: Reply with quote

My book, Practical Usage of TSO REXX, also available as e-book (PDF), provides a very comprehensive discussion, with code examples, of using REXX with various programming languages (Assembler, C, COBOL, PLI).

Regards
Tony
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group