I've a REXX program which calls a COBOL module and passes some data to it using simple CALL statements in rexx. COBOL does some business logic and has to return back the result to REXX from where it has been invoked and the REXX will execute the remaining code.
Till now, i used an intermediary file to write the result of COBOL and parse the same file using REXX to get the COBOL result back. Once the application is executed successfully, delete this intermediary file.
But i find this process as tedious (because of creating and deleting many intermediary files) and started searching for an alternative method.
Any one can suggest me an alternate way for doing this process ?
Here only REXX and COBOL modules are to be interfaced.
That link is DOM parsing. I'm working in SAX parsing. So i'll use COBOL itself for parsing and generation.
And COBOL can be used as External function too for REXX ??
I don't know how to use COBOL as External Function and kindly provide me some help for doing this.
Another easy way of passing variables between a REXX program and a COBOL program is using ISPF variable services VPUT and VGET (and VDEFINE in COBOL too).
The ISPF editor already provides you with working examples.
Simply enter "model class COBOL" respectively "model class REXX" to define the current language when you are in edit mode. Then enter "model" and you will see a menu offering templates for all ISPF services using the current language. Now select the desired service and the code including error handling code fragments and notes lines explaining common errors are copied into your source code.
That's pretty cool. Give it a try !