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 Previous  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
Mervyn
Moderator


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

PostPosted: Mon Sep 19, 2005 9:30 am    Post subject: Reply with quote

You need a proper ISPPROF. Copy your own ISPF.ISPPROF to another library, then use that.
_________________
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 10:07 am    Post subject: Reply with quote

Still i am facing the same problem can help to find out where i wnt wrong in this program
Thanks
Cool
Back to top
View user's profile Send private message
semigeezer
Supermod


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

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

You are allocating sysexec, the ddname from which rexx read its files, from within a Rexx progra, so the file is already open and you can't reallocate it. You need tp allocate SYSEXEC before you call your program. Since this is running in batch, just allocate SYSEXEC in the JCL (add your library at the top of the concatenation).

BDISPMAX errors simply mean that in batch you have exceeded some number of ISPF panel dislays. This is almost always the result of ISPF sitting on an error screen or some other screen you didn't mean to be displaying. Remember that in batch, all ISPF does is press the (virtual) enter key. If that causes the same screen to display again, then eventually you get the BDISPMAX error.
Back to top
View user's profile Send private message Visit poster's website
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Mon Sep 19, 2005 10:22 am    Post subject: Reply with quote

Thanks for your update but still i am facing the same prob can give me some example then it will be more helpful for me

Cool
Back to top
View user's profile Send private message
semigeezer
Supermod


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

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

BATCHPDF will set most of this up for you.
Back to top
View user's profile Send private message Visit poster's website
acevedo
Beginner


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

PostPosted: Tue Sep 20, 2005 1:31 am    Post subject: Reply with quote

'you need a proper ISPPROF'

What about this?

Code:
//ISPPROF  DD DSN=&&TEMP,DISP=(MOD,PASS,DELETE),                       
//            RECFM=FB,LRECL=80,BLKSIZE=8880,                           
//            SPACE=(TRK,(3,1,1))                                       
Back to top
View user's profile Send private message
Mervyn
Moderator


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

PostPosted: Tue Sep 20, 2005 3:19 am    Post subject: Reply with quote

There's nothing in it, pal!
_________________
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: Tue Sep 20, 2005 3:37 am    Post subject: Reply with quote

I am geeting error is isplog

02:22 Start of ISPF Log - - - - Session # 1 ---------------------------------
02:22 TSO - Command - - SASTEST PROC PGM
02:22 TSO - Command - - %TMAC1
02:22 Panel ISREDDE3 message - In batch, the following message was displayed
02:22 TMAC1 macro error - Command as entered: "TMAC1".
02:22 ***** Dialog Error ***** - Application(ISP); Function Command (SASTEST);
02:22 Line from cmd: - EDIT DATASET ('My.TEST.DATA(TDATA)') MAC


any ideas??/

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: Tue Sep 20, 2005 3:47 am    Post subject: Reply with quote

Coolguy,

This stuff works:

Code:

My JCL

//EDITMAC  EXEC PGM=IKJEFT01                           
//SYSEXEC  DD   DSN=yourid.REXX.TEST,DISP=SHR         
//ISPPROF  DD   DSN=yourid.COPY.ISPPROF,DISP=SHR       
//ISPPLIB  DD   DISP=SHR,DSN=SYS1.SISPPENU             
//ISPMLIB  DD   DISP=SHR,DSN=SYS1.SISPMENU             
//ISPSLIB  DD   DISP=SHR,DSN=SYS1.SISPSENU             
//ISPTLIB  DD   DISP=SHR,DSN=SYS1.SISPTENU             
//ISPLOG   DD   SYSOUT=*,DCB=(LRECL=125,RECFM=VBA)     
//SYSTSPRT DD   SYSOUT=*,DCB=LRECL=125                 
//SYSPRINT DD   SYSOUT=*                               
//SYSTSIN  DD   *                                       
  ISPSTART CMD(SASTEST)                               
//*                                                                             



Member SASTEST

/* REXX */                           
mac = 'TMAC1'                         
pds = 'yourid.REXX.TEST(TDATA)'     
abc = 'REXX -)'                       
xyz = 'MAC -)'                       
address ispexec                       
"VPUT (ABC XYZ) SHARED"               
"EDIT DATASET('"pds"') MACRO("mac")" 




Member TMAC1

/* REXX */                                   
address isredit                             
"MACRO PROCESS"                             
address ispexec "VGET (ABC XYZ) SHARED"     
"C ALL 'P###### -' '"abc"'"                 
"C ALL 'C###' '"xyz"'"                       
"END"                               




I've lost sight of the original requirement, but I don't think I'm too far off, am I?


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: Tue Sep 20, 2005 4:18 am    Post subject: Reply with quote

Thanks Merv it is working fine one help The values to the Generic variables (ReXX and mac) should be passed as parameters to the program. any ways to do thats

Thanks Tahnsk a lot
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: Tue Sep 20, 2005 4:32 am    Post subject: Reply with quote

I'm still a little confused. Please spell out the actual values you would want to pass to SASTEST in this particular case.
_________________
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: Tue Sep 20, 2005 4:47 am    Post subject: Reply with quote

Hi Mervyn

In your code

abc = 'REXX -)'
xyz = 'MAC -)'

but i want pass the parameters for this vaues from the Jcl i don't want the hard code the value in the rexx

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


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

PostPosted: Tue Sep 20, 2005 5:13 am    Post subject: Reply with quote

OK, change the JCL to this:

Code:

//EDITMAC  EXEC PGM=IKJEFT01                       
//SYSEXEC  DD   DSN=yourid.REXX.TEST,DISP=SHR       
//ISPPROF  DD   DSN=yourid.COPY.ISPPROF,DISP=SHR   
//ISPPLIB  DD   DISP=SHR,DSN=SYS1.SISPPENU         
//ISPMLIB  DD   DISP=SHR,DSN=SYS1.SISPMENU         
//ISPSLIB  DD   DISP=SHR,DSN=SYS1.SISPSENU         
//ISPTLIB  DD   DISP=SHR,DSN=SYS1.SISPTENU         
//ISPLOG   DD   SYSOUT=*,DCB=(LRECL=125,RECFM=VBA) 
//SYSTSPRT DD   SYSOUT=*,DCB=LRECL=125             
//SYSPRINT DD   SYSOUT=*                           
//SYSTSIN  DD   *                                   
  ISPSTART CMD(SASTEST REXXNAME MACNAME)           
//*                                                 



Change SASTEST to this:

Code:

/* REXX */                                   
arg abc xyz                                 
mac = 'TMAC1'                               
pds = 'yourid.REXX.TEST(TDATA)'             
address ispexec                             
"VPUT (ABC XYZ) SHARED"                     
"EDIT DATASET('"pds"') MACRO("mac")"         


and keep TMAC1 like this:

Code:

/* REXX */                                   
address isredit                             
"MACRO PROCESS"                             
address ispexec "VGET (ABC XYZ) SHARED"     
"C ALL 'P###### -' '"abc"'"                 
"C ALL 'C###' '"xyz"'"                       
"END"                                       



This won't work with your arguments of 'REXX -)' and 'MAC -)', but that's about all the time I have right now.

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


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

PostPosted: Tue Sep 20, 2005 5:54 am    Post subject: Reply with quote

Mervyn wrote:
There's nothing in it, pal!


OF COURSE you're right, I've used this method hundres of times but NEVER included any ISPEXEC statement other than EDIT DATASET... so I never faced that problem...

thanks Mervyn

In fact I have almost (without vput) the same program but adding arguments to the main program, I mean, ISPSTART CMD(SASTEST yourlibrary yourmac editview)...
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: Tue Sep 20, 2005 6:04 am    Post subject: Reply with quote

Coolguy,

Try the JCL that Mervyn has provided. Don't make any changes to the SYSTSIN. If you end up in an error. Post your full SYSPRINT message.

If you still feel there is some problem with passing parameters, Remove all statements from your SASTEST. Just get the arguments passed via JCL and use SAY command to display them. The SAY output will be stored in SYSPRINT. This way you can check if the arguments are passed without any problem.

Thanks,
Phantom
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 Previous  1, 2, 3  Next
Page 2 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