Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to run REXX using JCL - Getting RC(-3)
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Jun 19, 2014 12:53 pm    Post subject: Reply to: How to run REXX using JCL - Getting RC(-3)
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Jun 20, 2014 11:04 am    Post subject:
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: 51
Location: Switz

PostPosted: Fri Jun 20, 2014 12:39 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us