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
 

 

How to pass and retrieve the values from cobol to rexx

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

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Tue Oct 14, 2008 4:42 pm    Post subject: How to pass and retrieve the values from cobol to rexx
Reply with quote

have rexx pgm which calls the cobol pgm like below specified manner

http://ibmmainframes.com/viewtopic.php?t=32320&highlight=cobol

but how to retreive and store the output of the cobol pgm into rexx
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Oct 14, 2008 6:55 pm    Post subject: Reply to: How to pass and retrieve the values from cobol to
Reply with quote

Use the LINKMVS as shown in the example:

Code:

/* REXX */
parm = 'THIS IS A TEST'
Address LINKMVS "MYPROG parm"
Say "'"parm"'"
Exit 0


Code:

       IDENTIFICATION DIVISION.
       PROGRAM-ID. MYPROG
       ENVIRONMENT DIVISION.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

       LINKAGE SECTION.
       01  PARM.
           05 PARM-LENGTH        PIC S9(04) COMP SYNC.
           05 THE-PARM           PIC X(100).

       PROCEDURE DIVISION USING PARM.
           DISPLAY THE-PARM.
           MOVE 'I GOT IT ALL' TO THE-PARM.
           MOVE +12 TO PARM-LENGTH.
           GOBACK.


Code:

//STEP1    EXEC PGM=IRXJCL,PARM='MYEXEC'
//STEPLIB  DD   DISP=SHR,DSN=&SYSUID..COBOL.LOAD
//SYSEXEC  DD   DISP=SHR,DSN=&SYSUID..REXX
//SYSTSPRT DD   SYSOUT=*
//SYSOUT   DD   SYSOUT=*
//SYSTSIN  DD   DUMMY


Results:
THIS IS A TEST
'I GOT IT ALL'
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
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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