MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Running Rexx Thru Jcl
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Thu Sep 15, 2005 8:55 am    Post subject: Running Rexx Thru Jcl Reply with quote

I want to Run the rexx program to Jcl

My Jcl
Code:

//RexxabA JOB (T,JT,J9),CLASS=B,MSGCLASS=Z,       
//     NOTIFY=&SYSUID                                     
//STEP EXEC PGM=IRXJCL,PARM='SASTEST'                     
//SYSPRINT DD SYSOUT=*                                     
//SYSEXEC DD DSN=My.REXX.TEST,DISP=SHR               
//SYSTSPRT DD  SYSOUT=*                                   
//SYSTSIN DD DUMMY                                         
//*                                                       


My rexx progarm
Code:

 /* REXX */                                                     
 ADDRESS TSO                                                   
"ALLOC F(SYSEXEC) DA('my.REXX.TEST') SHR REUSE"                 
MAC  = "TMAC1"                                                 
PDS  = "my.REXX.TEST"                                           
MEM  = "TDATA"                                                 
  ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("MEM")') MACRO ("MAC")"
EXIT                                                           

Macro is
Code:

/* REXX */                                         
                                                   
ADDRESS ISREDIT "MACRO PROCESS"                   
ADDRESS ISREDIT "C ALL 'P###### -' 'REXX -)'"     
ADDRESS ISREDIT "C ALL 'C###' 'XMMM '"             
ADDRESS ISREDIT "SAVE"                             
ADDRESS ISREDIT "END"                             
                                                   
EXIT   

while running the Rexx in the command line it ran fine but trying to run thru Jcl which i posted
I am geting error

3 *-* "ALLOC F(SYSEXEC) DA(my.REXX.TEST') SHR REUSE"
+++ RC(-3) +++
7 *-* ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("MEM")') MACRO ("MAC")"
+++ RC(-3) +++

Can any one help me? and
I want to pass the parm for REXX and xmm how can we do it in rexx Pls help

Cool
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Sep 15, 2005 9:29 am    Post subject: Reply with quote

Coolguy,

This has already been discussed several times in this forum. You cannot invoke a REXX with ISPF service calls so easily thru' JCL. You need to allocate all ISPF libraries, ISPEXEC, ISPPLIB, ISPTLIB, ISPLLIB etc....before you run your exec.

Scan for BATCHPDF in TSO/ISPF. You will see couple of posts on running rexx thru' BATCH.

Thanks,
Phantom
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Sep 15, 2005 9:33 am    Post subject: Reply with quote

Just to reiterate, this is not a Rexx question per se, but an ISPF one. As Phantom mentioned you need an ISPF environment (properly allocated DD names). ISPF depends on TSO, so you also need a TSO environment (IKJEFT01 instead of IRXJCL). BATCHPDF does a reasonable job of creating JCL that mimics your online environment.
Back to top
View user's profile Send private message Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Sep 15, 2005 9:34 am    Post subject: Reply with quote

Also, to use ISPF services, you must be running in a TSO address space (i.e. use program IKJEFT01 instead of IRXJCL).
Back to top
View user's profile Send private message
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Fri Sep 16, 2005 10:13 am    Post subject: Reply with quote

When i am using this Jcl it is working fine but i need to pass some parms to the Rexx from the Jcl can help in that

My JCL is
Code:

//EDITMAC  EXEC PGM=IKJEFT01                       
//SYSEXEC  DD   DSN=My.REXX.TEST,DISP=SHR     
//ISPPROF  DD DSN=&&ISPPROF,DISP=(,PASS),         
//            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
//            RECFM=FB,LRECL=80                   
//ISPPLIB  DD   DSN=SYS1.ISPPLIB,DISP=SHR         

//ISPMLIB  DD   DSN=SYS1.ISPMLIB,DISP=SHR         
//ISPSLIB  DD   DSN=SYS1.ISPSLIB,DISP=SHR         
//ISPTLIB  DD   DSN=SYS1.ISPTLIB,DISP=SHR         
//ISPLOG   DD   SYSOUT=*,DCB=(LRECL=125,RECFM=VBA)
//SYSTSPRT DD  SYSOUT=*,DCB=LRECL=125             
//SYSPRINT DD  SYSOUT=*                           
//SYSTSIN  DD  *                                   
  ISPSTART CMD(SASTEST)                           
/*               

My rexx progarm
Code:

/* REXX */
ADDRESS TSO
"ALLOC F(SYSEXEC) DA('my.REXX.TEST') SHR REUSE"
MAC = "TMAC1"
PDS = "my.REXX.TEST"
MEM = "TDATA"
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("MEM")') MACRO ("MAC")"
EXIT

Macro is
Code:

/* REXX */

ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "C ALL 'P###### -' 'REXX -)'"
ADDRESS ISREDIT "C ALL 'C###' 'XMMM '"
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
 


The values to the Generic variables (ReXX and XMMM) should be passed as parameters to the program.

Thanks
Coolguy
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Sep 16, 2005 4:17 pm    Post subject: Reply with quote

coolguy,

You can pass parameter as shown below. Use ARG in your rexx exec to receive them and PUSH them and use PULL in the Macro.
Code:

//SYSTSIN DD *
%Rexx-pgm parm1 parm2


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Sep 16, 2005 11:30 pm    Post subject: Reply with quote

Coolguy,

Kolusu posted
Code:

//SYSTSIN DD *
%Rexx-pgm parm1 parm2


This SYSTSIN will work for regular macros but not for ones with ISPF services. Hence you have to use ISPSTART command.

Try this
Code:

//SYSTSIN  DD *
 ISPSTART CMD(rexx) PARM(parm1, parm2)


Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Mon Sep 19, 2005 5:55 am    Post subject: Reply with quote

Hi Phantom, Kolusu

I tried to pass the parms in given ways, But i am getting error

READY
ISPSTART CMD('SASTEST') PARM ('proc,pgm')
ISPD104 Invalid parameter given
'CMD('SASTEST') PARM ('proc,pgm')' invalid
READY
END

Can u please help me

Cool
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Mon Sep 19, 2005 6:17 am    Post subject: Reply with quote

I think PARM is only used when starting with a PGM.

Try this:

ISPSTART CMD(SASTEST PROC PGM)

Cheers,
Merv
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Mon Sep 19, 2005 6:53 am    Post subject: Reply with quote

still I am gettig the erroe

READY
ISPSTART CMD(SASTEST PROC PGM)
FILE SYSEXEC NOT UNALLOCATED, DATA SET IS OPEN
ISPP330 BDISPMAX exceeded -/-100 displays exceeded in batch mode on pane
READY
END


Pls help!!!!

Cool
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Mon Sep 19, 2005 7:01 am    Post subject: Reply with quote

Mervyn wrote:
I think PARM is only used when starting with a PGM.

Try this:

ISPSTART CMD(SASTEST PROC PGM)

Cheers,
Merv


I use it this way without problems.

If I'm not wrong the error you've shown has nothing to do with passing parameters...
Back to top
View user's profile Send private message
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Mon Sep 19, 2005 7:27 am    Post subject: Reply with quote

But while running thru Tso exec it ruuning fine but thru jcl ony it is giving prob
can u help in that

CoolGuy
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon Sep 19, 2005 7:34 am    Post subject: Reply with quote

Coolguy,

Quote:

ISPP330 BDISPMAX exceeded -/-100 displays exceeded in batch mode on pane


This is not an error with Parms. This error occurs when you to Open any panel (Edit/View or any custom panels) from your rexx and that panel is not closed properly.

If you use EDIT/VIEW dataset using any MACRO then issue ISREDIT BUILTIN CANCEL or ISREDIT END at the last line of your macro.

Thanks,
Phantom
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Mon Sep 19, 2005 7:52 am    Post subject: Reply with quote

/* REXX */

ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "C ALL 'P###### -' 'REXX -)'"
ADDRESS ISREDIT "C ALL 'C###' 'XMMM '"

ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"

EXIT

but he's doing it already.
Back to top
View user's profile Send private message
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Mon Sep 19, 2005 8:01 am    Post subject: Reply with quote

any idea to slove this pls help me

Thanks
Ravi
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group