Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us