passing data from cobol to rexx



IBM's Command List programming language & Restructured Extended Executor

passing data from cobol to rexx

Postby Sivapradeep » Wed May 02, 2012 6:12 pm

Hi,
i want to know the procedure for sending data of a variable from Cobol to Rexx.
one method which i knew is display the data from cobol on to spool and use rexx calls to read the spool data and get the data that was displayed by the cobol but this might be very complicated one. is there any other method to pass from cobol to rexx ?
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: passing data from cobol to rexx

Postby Akatsukami » Wed May 02, 2012 7:59 pm

Three that I can think of off the top of my head:
  1. Have the COBOL program write the values to a data set; have the Rexx script read and parse the record.
  2. Have COBOL and Rexx communicate with VGETs and VPUTs.
  3. If the COBOL program is invoked within the Rexx script, have it invoke the VDEFINE service to create dialog variables.
There are at least two others, but that's enough to get you going.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: passing data from cobol to rexx

Postby Sivapradeep » Wed May 02, 2012 8:05 pm

can you explain 2nd and 3rd methods in more detail please?
i'm not familiar with vget vput vdefine...
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: passing data from cobol to rexx

Postby dick scherrer » Wed May 02, 2012 9:51 pm

Hello,

As you are completely unfamiliar with these "V" commands, suggest you spend proper time reading about them in the documentation.

If you find something in the manual that is not clear, post what you found and your doubt. Someone will be able to clarify.

We don't have the resources to do "training" . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: passing data from cobol to rexx

Postby Akatsukami » Wed May 02, 2012 10:10 pm

VDEFINE
VGET
VPUT

(These links are to the z/OS v1.13 information center. However, unless your shop is running a seriously-backleveled version of ISPF -- which I concede is possible, given that many application outsourcing managers love to save money by hiring semi-literate clerks to maintain their 360/195s -- you shouldn't see significant differences.)

For VDEFINE and VPUT, you'll want to use ISPLINK. It's been quite a few years since I wrote any COBOL, but as I recall the syntax is:
CALL 'ISPLINK' USING parameter1,
                     parameter2,...

So for VDEFINE, you'll code:
CALL 'ISPLINK' USING 'VDEFINE',
                     name-list,
                     variable-structure,
                     format-array,
                     length-array
                     [,option-list].

name-list is the list of Rexx variable names, in the format:
(name1 name2...)

variable-structure is an 01-level structure with the COBOL variables defined as lower-level members; they don't have to have the same names as the Rexx variables, although you'll find it easier to keep track if they do.

format-array and length-array are arrays (or "internal tables", ISTR they are denoted in COBOL) of pictures X(8) and S9(9) COMP respectively, giving the types and lengths of the variables. Valid types are given in the fine manual. For option-list, you'll just want to use the literal 'LIST'.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: passing data from cobol to rexx

Postby NicC » Wed May 02, 2012 10:47 pm

I am not sure which manual but try the rexx manuals first as I know of at least one manual that gives an example of cobol/rexx communication
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: passing data from cobol to rexx

Postby MrSpock » Wed May 02, 2012 10:52 pm

Call the IRXJCL (REXX Interpretor) program and pass the exec name and parameters as you normally would to an exec.

The process is documented on IBM's website:

http://publib.boulder.ibm.com/infocente ... 605302.htm
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: passing data from cobol to rexx

Postby Sivapradeep » Thu May 03, 2012 3:00 pm

MrSpock wrote:Call the IRXJCL (REXX Interpretor) program and pass the exec name and parameters as you normally would to an exec.


thanks Spock, its working :)
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post