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)
Joined: 01 Sep 2006 Posts: 2133 Location: Silicon Valley
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.
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:
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