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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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