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
 

 

Invoking a rexx exec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Thu Oct 08, 2009 7:43 pm    Post subject: Invoking a rexx exec
Reply with quote

Hi,

Can I invoke a Rexx Exec by giving the exec name when I am in the ISPF primary option menu?

Lets say I want to excecute ;start 3.4 when I invoke an exec called Example when I am in ISPF primaru Menu. If it is possible could some one give me a sample Rexx code?

Thank you..
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 08, 2009 7:55 pm    Post subject: Re: Invoking a rexx macro
Reply with quote

sathyaraj wrote:
If it is possible could some one give me a sample Rexx code?

This is a HELP forum, not a do it for me forum.

What have you tried yourself and what errors have you encountered.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Thu Oct 08, 2009 8:22 pm    Post subject:
Reply with quote

expat, calm...

There is nothing wrong with asking for an example. The fellow is trying to learn to use a tool. If a budding surgeon asked to see how to use a scalpel, or a wannabe woodworker asked to see how to use a table saw, you wouldn't say "try it yourself and show me what you've done". You'd only end up with a mess (lots of blood for no benefit).


sathyaraj. Your question isn't quite clear. There are ways to invoke execs on any ISPF panel by just typing in the command (look for "command tables") but that is not common. Generally you invoke the Rexx exec by typing TSO followed by the exec name and its parameters.

There also seems to be some confusion about the START command. That is not a rexx exec, it is a built in ISPF command. You can invoke it from REXX though. Look at this article that I found searching Google for ISPSTRT
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Oct 08, 2009 8:42 pm    Post subject: Reply to: Invoking a rexx exec
Reply with quote

Of course, when someone states in their profile these facts:

Occupation: Programmer Analyst.
Mainframe Skills: REXX,COBOL,JCL,VSAM,CICS

Then I think we all can reasonably expect a higher level of the basic knowledge, although I'm noticing that TSO and ISPF are missing from the skillset, so maybe the OP doesn't normally use either.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Oct 09, 2009 1:18 pm    Post subject:
Reply with quote

MBabu wrote:
expat, calm...
There is nothing wrong with asking for an example.

I agree, but certainly AFTER the OP has done some research for themselves.

What was to stop the OP from using google or whatever to find the exact same thread that you did.

Oh, and thanks for the thread, it is good.
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Fri Oct 09, 2009 4:15 pm    Post subject:
Reply with quote

Sorry everyone...

I din mean you to do the work for me.. I dont have internet conenctivity at my workplace.. I was at my home when I posted the message and couldn get my hands on a Pcomm to get you the code details that I had..

address "ISPEXEC"
"SELECT PGM(ISPSTRT) PARM(3.4) SCRNAME(DSLIST)"
"SELECT PGM(ISPSTRT) PARM(S.ST) SCRNAME(SDSF)"

This was exactly what I was looking for.. Created this EXEC.. but was not sure how to invoke the same.. Will try the Command tables..

Thanks a lot..
Back to top
View user's profile Send private message
ShameemOracle

New User


Joined: 23 Sep 2009
Posts: 15
Location: bangalore

PostPosted: Tue Oct 13, 2009 11:12 am    Post subject:
Reply with quote

Quote:
Created this EXEC.. but was not sure how to invoke the same


Looking at your post I suppose your requirement is to invoke your piece of REXX code from an ISPF panel.. right ?

you have to modify your panel definition to invoke your rexx. In the panel definition you can call your REXX pgm like below
Code:
2,'CMD(%TEST3) SCRNAME(TCPIPNPF)'

Where TEST3 is the REXX having your code
address "ISPEXEC"
"SELECT PGM(ISPSTRT) PARM(3.4) SCRNAME(DSLIST)"
"SELECT PGM(ISPSTRT) PARM(S.ST) SCRNAME(SDSF)"

The panel definition follows [Take care of non printable chars while copy paste]
Code:
)PANEL KEYLIST(ISRSNAB,ISR)                                             
)ATTR DEFAULT(   ) FORMAT(MIX)            /* TEST3 - ENGLISH - 5.6 */   
 0D TYPE(PS)                                                           
 05 TYPE(PT)                                                           
 09 TYPE(FP)                                                           
 0A TYPE(NT)                                                           
 11 TYPE(SAC)                                                           
 26 TYPE(NEF) CAPS(ON) PADC(USER)                                       
 27 AREA(SCRL) EXTEND(ON)                                               
 28 TYPE(PS) CSRGRP(99)                                                 
)BODY  CMD(ZCMD)                                                       
                   Shameem's TEST Primary Option Menu                   
 Option ===> Z                                                         
 SAREA39                                                               
)AREA SAREA39                                                           
 1  GDDM PQM      GDDM Print Queue Manager                             
 2  Shamim P02    Invokes REXX R17057.REXX(TEST3)                       
 3  TASID 5.17    IBM TASID Version 5.17                               
)INIT                                                           
.ZVARS = '(ZCMD)'                                               
.HELP = ISR00003                                               
)PROC                                                           
&ZCMDWRK = &Z                                                   
IF (&ZCMD ¬= &Z)                                               
  &ZCMDWRK = TRUNC(&ZCMD,'.')                                   
  &ZTRAIL=.TRAIL                                               
  IF (&ZCMDWRK = &Z)                                           
    .MSG = ISRU000                                             
&ZSEL = TRANS (TRUNC (&ZCMD,'.')                               
  1,'CMD(ADMPQM) SCRNAME(GDDMPQM)'                             
  2,'CMD(%TEST3) SCRNAME(TCPIPNPF)'                             
  3,'PGM(TASID0) SCRNAME(SHAMEEM) NOCHECK'                     
  X,EXIT                                                       
 ' ',' '                                                       
   *,'?')                                                       
)END                                                           



The panel will look like this
Code:
                  Shameem's TEST Primary Option Menu                           
Option ===>                                                                   
                                                                               
1  GDDM PQM      GDDM Print Queue Manager                                     
2  Shamim P02    Invokes REXX R17057.REXX(TEST3)                               
3  TASID 5.17    IBM TASID Version 5.17                                       


Remember: your REXX libarary say R17057.REXX which contains TEST3 and panel libarary say R17057.SISPPENUwhich contains panel should be included in ISPF library concatenations ISPPLIB and SYSEXEC.

Feel free to ask if you need any more help on this.
Back to top
View user's profile Send private message
ShameemOracle

New User


Joined: 23 Sep 2009
Posts: 15
Location: bangalore

PostPosted: Tue Oct 13, 2009 11:36 am    Post subject:
Reply with quote

I would like to add two more points to my previous posts which came to my mind later.

1) instead of using numbers if you need you can use the EXEC name in the Panel choice. ie
instead of
Code:
2,'CMD(%TEST3) SCRNAME(TCPIPNPF)'

you can use
Code:
TEST3,'CMD(%TEST3) SCRNAME(TCPIPNPF)'


2) After addeing the REXX libarary say R17057.REXX which contains TEST3 to SYSPROC or SYSEXEC concatenation. you can invoke the rexx TEST3 from any ISPF panel like below
Code:
TSO TEST3
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 13, 2009 4:41 pm    Post subject:
Reply with quote

From what I make of your original request, you want to type TSO execname on the primary option menu and execute an exec to open another screen.

From the example given to you by MBabu, place the code into an ISPF concatenated library, either concatenated to SYSEXEC or SYSPROC and type TSO execname on the command line.

If the library is not ISPF concatenated, the ntype TSO EXEC 'library name(execname)' on the command line and it will work.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2025
Location: Silicon Valley

PostPosted: Thu Oct 22, 2009 6:18 am    Post subject: Reply to: Invoking a rexx exec
Reply with quote

I like this approach:
- have input field for command in the body of the menu
- user types name of command in field, then
- user types menu selection number (2 in example)
- panel executes the command, no matter what name
- command name is saved in profile, for next time panel is shown

The panel can be shared among various users and each one can invoke their own command.

This is a modified version of ShameemOracle panel
Code:
)BODY  CMD(ZCMD)                                                       
                   Pedro's Original Option Panel (POOP)                   
 Option ===> Z                                                         
 SAREA39                                                               
)AREA SAREA39       \
 2  User Command    Invokes. ._USRCMD     +
 3  TASID 5.17    IBM TASID Version 5.17                               
)PROC                                                           
&ZCMDWRK = &Z                                                   
IF (&ZCMD ¬= &Z)                                               
  &ZCMDWRK = TRUNC(&ZCMD,'.')                                   
  &ZTRAIL=.TRAIL                                               
  IF (&ZCMDWRK = &Z)                                           
    .MSG = ISRU000                                             
&ZSEL = TRANS (TRUNC (&ZCMD,'.')                   
  2,'CMD(&USRCMD) SCRNAME(USRCMD)'                                             
  X,EXIT                                                       
 ' ',' '                                                       
   *,'?')     

VPUT (USRCMD) PROFILE                                                 
)END                         
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 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
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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