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: 10231
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: 2429
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 REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


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