Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Passing data from REXX to C programme in MVS?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
chong.zhou

New User


Joined: 31 May 2017
Posts: 4
Location: Czech

PostPosted: Wed Jul 26, 2017 9:11 pm    Post subject: Passing data from REXX to C programme in MVS?
Reply with quote

Could anyone suggest me some method to resolve the following problem? Thanks a lot!!

I have program A written in REXX. A will prepare some data (some KB to around 1 MB or so) and launch program B to do further process with the data. B is a light weight helper program written in C (XLC). Both programs run in MVS, not on USS.

Besides creating a temporary dataset, is there any other way to pass that bulk of data (from A to B)? Command line parameter is not an option considering the size of the data. And this is a very small part of a project, so I prefer to use some light-weight approach. (i.e., like the pipe in Unix)

Thank you very much.
Back to top
View user's profile Send private message

Pedro

Senior Member


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

PostPosted: Wed Jul 26, 2017 10:41 pm    Post subject: Reply to: Passing data from REXX to C programme in MVS?
Reply with quote

There is a programming interface to get the value of a rexx variable. You can set a variable in the rexx program and retrieve the information from your C program. This is non-trival and would require you to improve your 'light weight helper program'.

See chapter 24 of 'TSO/E Programming Services'.

FYI. its an assembler programming interface but I think you should be able to do from C.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10292
Location: italy

PostPosted: Thu Jul 27, 2017 1:35 am    Post subject: Reply to: Passing data from REXX to C programme in MVS?
Reply with quote

see here for a sample on how to write a rexx external function in metal c
http://ibmmainframes.com/viewtopic.php?t=62889&highlight=metal
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 155
Location: Switzerland

PostPosted: Thu Jul 27, 2017 1:27 pm    Post subject:
Reply with quote

I don't know the specific linkage conventions for a C program, but I would look at the section 'Host command environments for linking to and attaching programs' in the REXX Reference manual. In there it says:
Quote:
After the LINKMVS or ATTCHMVS environment routine evaluates the value of each variable, it builds a parameter list pointing to the values. The routine then links to or attaches the program and passes the parameter list to the program

I did a quick Google for 'REXX CALL C PROGRAM', which turned up a number of hits. I think this one might be of use: https://groups.google.com/forum/#!topic/comp.lang.rexx/v5GfFrePYH0
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Default Message in Rexx cvnlynn CLIST & REXX 9 Wed Aug 02, 2017 12:38 am
No new posts Calling CLIST through job and REXX Sahasra K CLIST & REXX 19 Tue Aug 01, 2017 10:25 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us