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
 

 

CALL in REXX

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

New User


Joined: 06 Jan 2015
Posts: 18
Location: Hyderabad, INDIA

PostPosted: Wed Jul 29, 2015 11:57 am    Post subject: CALL in REXX
Reply with quote

Hi Experts,

I have a requirement to call a paragraph/section in my REXX code which is present in a panel.

Normally to come out of section we use RETURN. But if I use the same in PANEL, the control is skipping and the next panel is not displaying.

Can anyone please let me know the solution.

TIA
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jul 29, 2015 12:51 pm    Post subject:
Reply with quote

Quote:
I have a requirement to call a paragraph/section in my REXX code which is present in a panel.


A panel is ISPF, not REXX. How can you have REXX code embedded in a panel?

Garry.
Back to top
View user's profile Send private message
tvinodkumar7

New User


Joined: 06 Jan 2015
Posts: 18
Location: Hyderabad, INDIA

PostPosted: Wed Jul 29, 2015 4:00 pm    Post subject: Reply to: CALL in REXX
Reply with quote

Hi Garry,

As of now I am already executing the rexx code in the panels under the section ADDRESS TSO and
throwing the panel under the section ADDRESS ISPEXEC.
After the completion of REXX the output variables are able to show in panel.

Let me know if any concerns.

TIA
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jul 29, 2015 4:04 pm    Post subject:
Reply with quote

Can you show your code? (using the code tags) Also, you don't "throw" panels, you display them.

Garry
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Jul 29, 2015 4:24 pm    Post subject:
Reply with quote

Garry Carroll wrote:
Quote:
I have a requirement to call a paragraph/section in my REXX code which is present in a panel.


A panel is ISPF, not REXX. How can you have REXX code embedded in a panel?

Garry.

With the *REXX statement, although Vinod's statement is confused enough that it's unclear if he's trying to use it. Like you, I want to see the code.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1714
Location: UK

PostPosted: Wed Jul 29, 2015 6:40 pm    Post subject:
Reply with quote

Also Rexx does not have paragraphs and sections. It has sub-routines.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Jul 29, 2015 9:20 pm    Post subject: Reply to: CALL in REXX
Reply with quote

This entire thread does not make much sense to me. I also want to see the code.

My guess is he has a menu panel and that it eventually resolves to something like:
Code:
&ZSEL = TRANS(&ZCMD N, 'CMD(%myrexx)'...)

But because of the terminology issues, it could be something else totally.
Back to top
View user's profile Send private message
tvinodkumar7

New User


Joined: 06 Jan 2015
Posts: 18
Location: Hyderabad, INDIA

PostPosted: Fri Jul 31, 2015 2:39 pm    Post subject: Reply to: CALL in REXX
Reply with quote

I am not throwing the panels. I am displaying the panels. Since I was very new to this REXX, I might have caused some confusion.

Please accept my apology.

Also I want to confirm you that I am writing the REXX code under "ADDRESS TSO", after which the panel is displayed using the command ADDRESS ISPEXEC.

I come up with one more query. If the key is PF03, I am coming out of panel as per the below code.

000590 ADDRESS ISPEXEC
000591 'DISPLAY PANEL(NEWPAN4)'
000592
000593 IF PFKEY = 'PF03' THEN EXIT

Now I want to route to different panel when PF04 is pressed, Can anyone please let me know how to code for this ?

TIA
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Jul 31, 2015 4:00 pm    Post subject:
Reply with quote

You should realize that putting address ispexec on a line by itself will change the default environment, causing all subsequent commands to be directed to the ISPEXEC environment unless explicitly directed elsewhere. This is unlikely to be your intention.

You should also realize that executing the END command (which is usually assigned to the PF3 key, but need not be; I maintain a tool where it is assigned to PF12 (this was not my idea)) in your panel will cause it to return to the driver with RC=8; you should test for that instead.

Your best bet, I think, would be to assign some token (not necessarily an actual ISPF command) to PF4, and then test zcmd when you exit the panel.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Jul 31, 2015 9:09 pm    Post subject: Reply to: CALL in REXX
Reply with quote

Regarding your code:
Code:
000590 ADDRESS ISPEXEC
000591 'DISPLAY PANEL(NEWPAN4)'
000592
000593 IF PFKEY = 'PF03' THEN EXIT

You have a misconception... you seem to think the EXIT on line 593 will cause you to leave the panel. This is not the way it works.

I doubt that there is a variable called PFKEY or that it has a value of 'PF03'. But if it were ever true, it would exit from your rexx program.

The DISPLAY service on line 591 works like a CALL. It causes a transfer of control to some ISPF modules. Your rexx program waits until ISPF does its processing and returns to you.

My suggestion is to check the return code (Rc=0 means Enter was pressed, RC=8 means PF3 was pressed):
Code:
000590 ADDRESS ISPEXEC
000591 'DISPLAY PANEL(NEWPAN4)'
000592 If RC = 0 Then
000593    'DISPLAY PANEL(NEWPAN5)
000594 Else
000595    Exit


Akatsukami-san's suggestion of:
Quote:
assign some token ... to PF4, and then test zcmd when you exit the panel.

is a good suggestion.

You did not show us your panel code... you should know there are some panels that are 'menu' panels where they can go directly to another panel. Though, some people like to control the logic from rexx.
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
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


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