IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to run REXX using JCL - Getting RC(-3)


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Natarajan R A

New User


Joined: 11 Jun 2014
Posts: 12
Location: INDIA

PostPosted: Thu Jun 19, 2014 9:59 am
Reply with quote

Hi,

I want to run a REXX program using JCL, which fetches last and last before records from a dataset.

JCL:

//STEP001 EXEC PGM=IKJEFT01,
// PARM='PSNAME'
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DSN=DSNname,DISP=SHR
//SYSTSIN DD *

REXX:

I=1
INPUT = 'RST.rxx'
ADDRESS 'ISPEXEC'
"LMDINIT LISTID(LISTID) LEVEL("INPUT")"
IF RC > 0 THEN RETURN 0
"LMDLIST LISTID("LISTID") DATASET(DSNAME) OPTION(LIST)"
DO WHILE RC = 0
SAY 'FOUND DATASET 'DSNAME*/
ST.I=DSNAME
J=I
K=I-1
I=I+1
"LMDLIST LISTID("LISTID") DATASET(DSNAME) OPTION(LIST)"
END
"LMDFREE LISTID("LISTID")"
IF RC > 0 THEN RETURN 0
SAY 'PREVIOUS FILE NAME :'ST.K
SAY 'CURRENT FILE NAME :'ST.J
RETURN 1

Error:

5 *-* "LMDINIT LISTID(LISTID) LEVEL("INPUT")"
+++ RC(-3) +++
7 *-* "LMDLIST LISTID("LISTID") DATASET(DSNAME) OPTION(LIST)"
+++ RC(-3) +++
16 *-* "LMDFREE LISTID("LISTID")"
+++ RC(-3) +++

If I run REXX directly, I am not getting RC(-3) error, and its executing fine.

Is there are any JCLs to execute REXX successfully . ? or correct me if I went any where wrong in the above JCL or REXX.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 19, 2014 12:53 pm
Reply with quote

search the forum on how to run thru jcl a REXX script that invokes ISPF services.
Back to top
View user's profile Send private message
Natarajan R A

New User


Joined: 11 Jun 2014
Posts: 12
Location: INDIA

PostPosted: Fri Jun 20, 2014 9:27 am
Reply with quote

Hi,

Before posting this query I tried finding the same in this forum . but was unsuccessful . .
Please let me know if any links available or can you provide other alternatives . ?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jun 20, 2014 11:04 am
Reply with quote

Search for : ISPSTART
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Fri Jun 20, 2014 12:39 pm
Reply with quote

Code:
//S1          EXEC PGM=IKJEFT1A
//SYSEXEC  DD DISP=SHR,DSN=my.rexx.lib
//ISPPLIB  DD DISP=(,PASS),SPACE=(TRK,(1,1,1)),UNIT=VIO,
//            DCB=(LRECL=80,BLKSIZE=27920,DSORG=PO,RECFM=FB)
//ISPMLIB  DD DISP=SHR,DSN=SYS1.ISP.SISPMENU   CAN'T BE TMP
//ISPSLIB  DD DISP=(,PASS),SPACE=(TRK,(1,1,1)),UNIT=VIO,
//            DCB=(LRECL=80,BLKSIZE=27920,DSORG=PO,RECFM=FB)
//ISPPROF  DD DISP=(,PASS),SPACE=(TRK,(1,1,1)),UNIT=VIO,
//            DCB=(LRECL=80,BLKSIZE=27920,DSORG=PO,RECFM=FB)
//ISPTABL  DD DISP=(,PASS),SPACE=(TRK,(1,1,1)),UNIT=VIO,
//            DCB=(LRECL=80,BLKSIZE=27920,DSORG=PO,RECFM=FB)
//ISPTLIB  DD DISP=SHR,DSN=SYS1.ISP.SISPTENU  CAN'T BE TMP
//ISPLOG   DD DSN=&&TMP,UNIT=SYSDA,SPACE=(121,(10,10,10)),DISP=(,PASS)
//SYSTSIN DD *
 PROFILE NOPREFIX
 ISPSTART CMD(%MYEXEC PARM1 PARM2 etc)
//
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top