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 REXX from ISPF command line and EDIT/VIEW sessions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
hailashwin

New User


Joined: 16 Oct 2008
Posts: 73
Location: Boston

PostPosted: Fri Mar 02, 2012 6:06 pm    Post subject: Invoking REXX from ISPF command line and EDIT/VIEW sessions
Reply with quote

Hi,
I am very new to REXX and for a beginner, I started to incorporate my learning into a small program. I have created a tool that would actually open up an element if it is in a set of libraries that I have pre-defined.
Say for example, I have a statement in my JCL like CNTLCARD(abcd1), it would check if the element ‘abcd1’ exists in the predefined library or not. If yes, it would open up or else it will display a message. For this, I have created a Macro and so I invoke it without a 'TSO' preceding it.

Now, I have created a second tool which gets the argument from the user on the command line and does the same kind of check and opens the element for him. But this time I get it thru an ARG and I invoke it with the 'TSO' Preceding.
Code:

arg userentry                         
PARSE VAR userentry element1 ' ' type1

In an effort to integrate them into a single tool as most of the logic is similar except that one is from a specific line in my editor session and the other is from the command line, I am failing pathetically.

I partially had a resolution when I used the below code
Code:

 ADDRESS ISREDIT "MACRO (ELEMENT1,TYPE1)" NOPROCESS
"ISREDIT (ROWLINE) = LINE .ZCSR"           

And I had a logic which would process the record as Argument if Element1 >' ' or else it would process it as a line in my editor session.

But the problem was that, it works only when opened inside a edit/view session.
The whole idea is a single function key(which I would set for this tool) for all my element navigation. Can this be done? Or should they exist as two different entities? Any help in this regard would be greatly appreciated.

Thanks,
Ashwin.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Fri Mar 02, 2012 6:13 pm    Post subject: Reply to: Invoking REXX from ISPF command line and EDIT/VIEW
Reply with quote

Quote:
Can this be done? Or should they exist as two different entities? Any help in this regard would be greatly appreciated.


whatever You meant can probably be done but ...
your explanation was clear as mud.
so based on Your explanation we just can tell nada


but since today is friday ( half psychic day )
maybe You meant something like a zoom macro ...
it has already been written and posted ( search for it in the forums )
Back to top
View user's profile Send private message
hailashwin

New User


Joined: 16 Oct 2008
Posts: 73
Location: Boston

PostPosted: Fri Mar 02, 2012 8:37 pm    Post subject:
Reply with quote

Thanks enrico. Let me try to explain in a better way

Its quite similar to the zoom macro you mentioned. Like reading the cursor position(ROWLINE) and trying to open a particular member in a pds based on that.

In addition I want it to accept a string on the command line and try to open that member from those PDSs.

So I had the below code in place...

Code:

ADDRESS ISREDIT "MACRO (ELEMENT1)" NOPROCESS
"ISREDIT (ROWLINE) = LINE .ZCSR"   

IF ELEMENT1 > ' ' THEN
   PROCESS IT AS ARGUMENTS
ELSE
   PROCESS IT AS ROW LINE


I had my pf2 key set to this macro name. And when I give a member name(say ABCD) on the command line and press pf2 key it would search ABCD in the list of PDSs, ELSE it would read my cursor position and pick the member name and search the libraries.

Everything works fine when I am in a edit/view session. But does not work elsewhere.

1. Is it possible to have this macro invoked from the ISPF command line also is my first question?

2. If not, I can have the ROWLINE logic as a macro and Command line logic as a REXX program(where I would get the user value by coding ARG ELEMENT1). Is it possible that these two can be invoked from another REXX/MACRO which I can configure to my pf2 key now. Ultimately a single tool for two functions.

I know am shooting in the dark and my explanation might be mud again with a week's knowledge in REXX now. icon_rolleyes.gif
But any of your inputs in this regard is invaluable.

Thanks,
Ashwin.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 650
Location: Whitby, ON, Canada

PostPosted: Fri Mar 02, 2012 9:37 pm    Post subject:
Reply with quote

Edit macros can only work in Edit or View. They cannot be used on other ISPF panels.

To implement cursor-sensitive functionality on other ISPF panels requires a different technique. Look up ZSCREENI and ZSCREENC in the ISPF Dialog Developers Guide for more information.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sat Mar 03, 2012 2:53 am    Post subject: Reply to: Invoking REXX from ISPF command line and EDIT/VIEW
Reply with quote

Code:
ADDRESS ISREDIT "MACRO (ELEMENT1,TYPE1)" NOPROCESS


You cannot issue ISREDIT stuff outside of the editor / view. Look at the return code and process accordingly.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts How to see VIEW definition from BMC c... rohanthengal DB2 1 Thu May 04, 2017 1:50 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm


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