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
 
NATURAL trick: Calling REXX directly from within NATURAL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 17, 2006 12:20 pm    Post subject: NATURAL trick: Calling REXX directly from within NATURAL
Reply with quote

Here is an example of executing a REXX exec directly from NATURAL under TSO or batch.
This example uses IRXJCL, which is the REXX standard routine for invoking REXX in MVS batch. The IRXJCL routine documented in the REXX Reference manual.
I put "directly", as opposed to other ways of executing REXX from within NATURAL. I will post the other ways in separate posts.

The NATURAL program:
Code:

DEFINE DATA LOCAL                       
1 #REXX-PARM                           
  2 #LEN (B2)                           
  2 #PARM (A80)                         
END-DEFINE                             
*                                       
#PARM := 'FROMNAT OFERF.A.REXX(FROMNAT)'
#LEN  := 80                             
*                                       
CALL 'IRXJCL' #LEN #PARM               
*                                       
END                                     


The REXX (this is an example only, you can execute any REXX):
Code:

/*------------------------------- REXX ------------------------------- 
 * PROGRAM   : FROMNAT                                                 
 * FUNCTION  : CALLED FROM NATURAL. ACCEPTS DS NAME AND VIEW IT.       
 * AUTHOR    : OFER                                                     
 * DATE      : 15/12/03                                                 
 * HOW TO USE:                                                         
 *           :                                                         
 *------------------------------------------------------------------*/ 
                                                                       
ARG DS                                                                 
                                                                       
DS = STRIP(DS,"B","'")                                                 
DS = STRIP(DS)                                                         
                                                                       
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"                                 
ADDRESS ISPEXEC "VIEW DATASET('"DS"')"                                 
                                                                       
EXIT                                                                   
                                                                       


O.
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 -> Java & MQSeries 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