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 

REXX - Running from JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
karthikey
Beginner


Joined: 16 Jun 2006
Posts: 8
Topics: 3

PostPosted: Fri Jun 16, 2006 7:46 am    Post subject: REXX - Running from JCL Reply with quote

Hi,

Following is my REXX code to retrive member name and Last modified user id.
Code:

/* REXX*/                                           
ADDRESS "ISPEXEC"                                   
"LMINIT DATAID(LMID) DATASET('"XXXXX.TEST.PGM"')" 
"LMOPEN DATAID("LMID")"                             
DO FOREVER = 1                                       
    "LMMLIST DATAID("LMID") MEMBER(LMMEM) STATS(YES)"
    IF RC > 0 THEN LEAVE                             
    SAY 'MEMBER NAME:' LMMEM                         
    SAY 'TSO UID    :' ZLUSER                       
END                                                 
"LMFREE DATAID("LMID")"                       

It is working fine me, while running like EX 'XXXXXX.REXX.EXEC(ISPFLIST)'

I need to run above REXX program using JCL.
So I have used following JCL for this..

Code:
//RBDRCHK1 EXEC PGM=IKJEFT01                             
//SYSEXEC   DD DSN=PL.NPL.PROD.EXEC,DISP=SHR             
//ISPPROF   DD DSN=&&PROF,UNIT=SYSDA,SPACE=(TRK,(5,5,5)),
//             RECFM=FB,LRECL=80                         
//ISPSLIB   DD DISP=SHR,DSN=PL.NPL.PROD.SLIB             
//          DD DISP=SHR,DSN=ISP.SISPSENU                 
//ISPPLIB   DD DISP=SHR,DSN=PL.NPL.PROD.PLIB             
//          DD DISP=SHR,DSN=ISP.SISPPENU                 
//ISPMLIB   DD DISP=SHR,DSN=PL.NPL.PROD.MLIB             
//          DD DISP=SHR,DSN=ISP.SISPMENU                 
//ISPTLIB   DD DISP=SHR,DSN=ISP.SISPTENU                 
//DD1       DD DSN=F907042.TEST.JCL,DISP=SHR             
//SYSPRINT  DD SYSOUT=*                                   
//SYSTSPRT  DD SYSOUT=*                                   
//SYSTSIN DD *                                           
EX 'XXXXXX.TEST.PGM(ISPFLIST)'                           
/* 


I am not getting desired out put...Please help.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jun 16, 2006 7:53 am    Post subject: Reply with quote

Where in your JCL is your ISPSTART command (the command that starts ISPF under your TSO session), as described here?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jun 16, 2006 8:08 am    Post subject: Reply with quote

karthikey,

I suggest you read this excellent article of running rexx programs

http://www.mvsforums.com/helpboards/viewtopic.php?t=5275

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
karthikey
Beginner


Joined: 16 Jun 2006
Posts: 8
Topics: 3

PostPosted: Fri Jun 16, 2006 8:22 am    Post subject: Reply with quote

I have added ISPFSTART CMD(SELECT) in my JCL as follows

Quote:

//RBDRCHK1 EXEC PGM=IKJEFT01
//STEPLIB DD DSN=F907042.TEST.CEXEC,DISP=SHR
//SYSEXEC DD DSN=PL.NPL.PROD.EXEC,DISP=SHR
//ISPPROF DD DSN=&&PROF,UNIT=SYSDA,SPACE=(TRK,(5,5,5)),
// RECFM=FB,LRECL=80
//ISPSLIB DD DISP=SHR,DSN=PL.NPL.PROD.SLIB
// DD DISP=SHR,DSN=ISP.SISPSENU
//ISPPLIB DD DISP=SHR,DSN=PL.NPL.PROD.PLIB
// DD DISP=SHR,DSN=ISP.SISPPENU
//ISPMLIB DD DISP=SHR,DSN=PL.NPL.PROD.MLIB
// DD DISP=SHR,DSN=ISP.SISPMENU
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU
//DD1 DD DSN=F907042.TEST.JCL,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROFILE PREFIX(F907042)
ISPSTART CMD(SELECT)
EX 'F907042.TEST.PGM(ISPFLIST)'
//SYSTSPRT DD SYSOUT=*


But i am getting following out error

Quote:

ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
READY
PROFILE PREFIX(F907042)
READY
ISPSTART CMD(SELECT)
IKJ56500I COMMAND SELECT NOT FOUND
ISPD123 Invalid command
Command 'SELECT' not found or contains invalid syntax.
F907042.RZ1.SPFLOG1.LIST has been kept.
READY
EX 'F907042.TEST.PGM(ISPFLIST)'
3 *-* \"LMINIT DATAID(LMID) DATASET('\"F907042.TEST.PGM\"')\"
+++ RC(-3) +++
4 *-* \"LMOPEN DATAID(\"LMID\")\"
+++ RC(-3) +++
7 *-* \"LMMLIST DATAID(\"LMID\") MEMBER(LMMEM) STATS(YES)\"
+++ RC(-3) +++
+++ RC(-3) +++
MEMBER NAME: LMMEM
TSO UID : ZLUSER



Please let me know.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jun 16, 2006 8:28 am    Post subject: Reply with quote

karthikey,

A return code of -3 is due to missing ISPEXEC environment. Check this link which explains in detail about running ISPF in batch

http://mvsforums.com/helpboards/viewtopic.php?t=5276&highlight=batchpdf

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
karthikey
Beginner


Joined: 16 Jun 2006
Posts: 8
Topics: 3

PostPosted: Fri Jun 16, 2006 9:19 am    Post subject: Reply with quote

As per your link suggest,
I have made changes in my jcl and now i am getting following message

Quote:

ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
READY
ISPSTART CMD(ISPFLIST) LANG(CREX)
Command 'ISPFLIST' abended with code 806000. Load module not found.


If you explain me with JCL, How to complie and link-edit the rexx module that will be great helpful for me.
Back to top
View user's profile Send private message
semigeezer
Supermod


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

PostPosted: Fri Jun 16, 2006 10:52 am    Post subject: Reply with quote

You've probably compiled it OK already. Add either a STEPLIB or ISPLLIB ddname which points to your load data set.
Back to top
View user's profile Send private message Visit poster's website
karthikey
Beginner


Joined: 16 Jun 2006
Posts: 8
Topics: 3

PostPosted: Fri Jun 16, 2006 11:01 am    Post subject: Reply with quote

It's work as exepected.

Thanks Much for the immt. help provided.

Hats off to all.
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
Page 1 of 1

 
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