Page 1 of 1

How to execute REXX code

PostPosted: Wed Jul 21, 2010 10:36 am
by yousufroushan
Hi,
I am new to REXX. I have written a simple REXX code and compiled it by going to 4--->14 in ISPF MENU options. But i don't know how to execute REXX code.Help me in how to execute REXX code.

Re: How to execute REXX code

PostPosted: Wed Jul 21, 2010 12:44 pm
by expat
TSO EXEC 'dataset name(member name)' is one way

Are we talking foreground or background here

Re: How to execute REXX code

PostPosted: Wed Jul 21, 2010 2:44 pm
by yousufroushan
thanks expat.
As i am new to REXX, i don't know about this option. Tell me about background option also.

Re: How to execute REXX code

PostPosted: Wed Jul 21, 2010 4:20 pm
by NicC
please note: you do not need to compile Rexx programs - they run quite nicely interpreted.

If your dataset name is part of your SYSEXEC concatenation then you can run simple by typing the member name at the prompt in option 6 or by TSO member at any ISPF prompt.

In background you execute IKJEFT01 which is batch TSO. you need SYSTSPRT for Rexx ouptout (from Trace and SAY) and SYSTSIN which is where you provide the tso command run your member...from one of my jobs
//RUNREXX EXEC PGM=IKJEFT01                                                     
//SYSTSIN  DD *                                                                 
 EXEC 'HLQ.LLQ.EXEC(DJC)' 'AUTOSUB1'                                         
/*                                                                             
//SYSTSPRT DD SYSOUT=*                                                         
//SYSPRINT DD SYSOUT=*                                                         
//PLAN     DD DSN=HLQ.LLQ.JCL(AUTODJC),DISP=SHR

by including DDNAMES for any file you use you do not need to allocate them within the program which is why I have a DDNAME for PLAN