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 Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
This topic is locked: you cannot edit posts or make replies. Rexx to Grab ISMF Information. upendrasri All Other Mainframe Topics 16 Sun Nov 26, 2017 12:35 am
No new posts Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 12 Sun Nov 19, 2017 7:59 pm

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