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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 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
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

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