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
 

 

How to handle input entered on ISPF panel dynamically?

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

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Fri Jul 18, 2008 11:39 am    Post subject: How to handle input entered on ISPF panel dynamically?
Reply with quote

I have created a ISPF panel which displays 10 PDS names. This panel requires user to enter 3 inputs: any one of the listed PDS names, a member name (member of the selected PDS) and edit/browse option. This should take the user to the given member opened in browse/edit mode.

How can I handle these inputs entered on the panel dynamically?
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Jul 18, 2008 12:03 pm    Post subject:
Reply with quote

First, there is no such thing as 'REXX panel'. Panels are ISPF components, and they can be displayed using any available language (including REXX).

I don't know what do you mean by "dynamically", but yes, you can process user's input by the same REXX that was used to display the panel.

O.
Back to top
View user's profile Send private message
Ekta Sharma

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Fri Jul 18, 2008 12:14 pm    Post subject:
Reply with quote

What I mean is that the user can select any of the PDS names listed on the panel. How the code should handle this thing?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Jul 18, 2008 8:32 pm    Post subject:
Reply with quote

If you have the dataset name, you can use (for example) the EDIT ISPF Service to edit the dataset.

O.
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 18, 2008 9:27 pm    Post subject: Reply to: How to handle input entered on ISPF panel dynamica
Reply with quote

How are the 10 names displayed? And how does the user select one of the names?

FYI. Assign the selected name to a fixed variable name, then use that variable to edit. Something like:
Code:
Select;
  when (choice = 1) Then
      edit_this = dsn1
.
.
.
"EDIT DSN("edit_this")"
Back to top
View user's profile Send private message
Ekta Sharma

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Mon Jul 21, 2008 3:12 pm    Post subject:
Reply with quote

The 10 names are displayed as a vertical list:

1. PDS1.TEMP.SAY
2. PDS2.TEMP.QUIT
3.
.
.
10. PDS10.INPUT.TEMP

The SELECT clause would work well in this case. But the user needs to enter the member name too.
If I put the SELECT code in my REXX pgm (currently used for invoking the panel. It gives invalid statement for:
"ISPEXEC EDIT DATASET('"EDIT_THIS(MEM1)"')"

The code is as follows:

MEM1=STRIP(B)
DSN1=STRIP(A1)
CHOICE=STRIP(ZCMD)
SAY CHOICE
SELECT;
WHEN (CHOICE=1) THEN
EDIT_THIS=DSN1
OTHERWISE
SAY 'INCORRECT CHOICE'
END
"ISPEXEC EDIT DATASET('"EDIT_THIS(MEM1)"')"
END

Here, B holds the member name input by the user in the ISPF panel and A1 holds the PDS name associated with option 1 (in the list).
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jul 21, 2008 3:18 pm    Post subject: Reply to: How to handle input entered on ISPF panel dynamica
Reply with quote

looks like the dataset name is not built correctly...

Code:
ISPEXEC EDIT DATASET("'" !! EDIT_THIS !! "(" !! MEM1 !! ")')"


note. !! stands for the concatenation operator, in some environments could be ||
Back to top
View user's profile Send private message
Ekta Sharma

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Mon Jul 21, 2008 3:28 pm    Post subject:
Reply with quote

I tried it. But it's giving the following error:

Invalid member name
Member name must be 1-8 characters and enclosed in parentheses.
Current dialog statement:
EDIT DATASET(!!EDIT_THIS!!(!! MEM1 !!))
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Jul 21, 2008 3:30 pm    Post subject:
Reply with quote

Have you thought about using TRACE?

O.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jul 21, 2008 3:35 pm    Post subject: Reply to: How to handle input entered on ISPF panel dynamica
Reply with quote

Quote:
I tried it. But it's giving the following error:

Invalid member name
Member name must be 1-8 characters and enclosed in parentheses.
Current dialog statement:
EDIT DATASET(!!EDIT_THIS!!(!! MEM1 !!))


You tried wrong...
the statement You posted does not even have a correct REXX syntax
Back to top
View user's profile Send private message
Ekta Sharma

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Mon Jul 21, 2008 3:49 pm    Post subject:
Reply with quote

The REXX statement that I had mentioned above is the part of error message. It's interpreted.

The statement that I had given in my code is:
"ISPEXEC EDIT DATASET("'!!EDIT_THIS!!(!! MEM1 !!)'")"

I also tried using:
"ISPEXEC EDIT DATASET("'!!EDIT_THIS!!"("!! MEM1 !!")"'")"

Same error is coming in both the case.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Jul 21, 2008 3:52 pm    Post subject:
Reply with quote

The || sign should be outside the quotes, just as in Enrico's example.

O.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jul 21, 2008 3:53 pm    Post subject: Reply to: How to handle input entered on ISPF panel dynamica
Reply with quote

are You sure You are using the right concatenation chars
as I already said in my previous posts it could be !! or ||
Back to top
View user's profile Send private message
Ekta Sharma

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Mon Jul 21, 2008 3:55 pm    Post subject:
Reply with quote

I have tried both the symbols !! as well as ||

"ISPEXEC EDIT DATASET("'¦¦EDIT_THIS¦¦(¦¦ MEM1 ¦¦)'")"
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jul 21, 2008 3:59 pm    Post subject: Reply to: How to handle input entered on ISPF panel dynamica
Reply with quote

before the offending statement put a
Code:
TRACE "I"

put a
Code:
 TRACE "O"
after

and post the trace result ( please use the code tags )
Back to top
View user's profile Send private message
Ekta Sharma

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Mon Jul 21, 2008 4:14 pm    Post subject:
Reply with quote

I used:
"ISPEXEC EDIT DATASET('"!!EDIT_THIS!!"("!!MEM1!!")')"


It gave:
20 *-* "ISPEXEC EDIT DATASET('"!!EDIT_THIS!!"("!!MEM1!!")')"
>L> "ISPEXEC EDIT DATASET('"
>L> "!!EDIT_THIS!!"
>O> "ISPEXEC EDIT DATASET('!!EDIT_THIS!!"
>L> "("
>O> "ISPEXEC EDIT DATASET('!!EDIT_THIS!!("
>L> "!!MEM1!!"
>O> "ISPEXEC EDIT DATASET('!!EDIT_THIS!!(!!MEM1!!"
>L> ")')"
>O> "ISPEXEC EDIT DATASET('!!EDIT_THIS!!(!!MEM1!!)')"


Data set not cataloged
'!!EDIT_THIS!!' was not found in catalog.

Current dialog statement:
EDIT DATASET('!!EDIT_THIS!!(!!MEM1!!)')
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jul 21, 2008 4:20 pm    Post subject: Reply to: How to handle input entered on ISPF panel dynamica
Reply with quote

try this other way ( I usually do not recommend it because it makes things less clear )

Code:
"ISPEXEC EDIT DATASET('"EDIT_THIS"("MEM1")')"


but it would be wise to find out the correct concatenation char for Your
environment,
it could be due also to the 3270 emulator setup
Back to top
View user's profile Send private message
Ekta Sharma

New User


Joined: 26 Feb 2008
Posts: 35
Location: pune

PostPosted: Mon Jul 21, 2008 4:31 pm    Post subject:
Reply with quote

This one worked. Thanks enrico!

Another small query:
As I told that there is a list of PDS on the panel from where the user can select any one.
This list of PDS is editable and the user can add PDS names to it as per his requirement. I have used VPUT for retaining the PDS names on the panel. But once I logoff from TSO, this list of PDS is lost. How can I retain this list (I want that the PDS names should stay on the panel until the user himself removes them)?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Jul 21, 2008 4:40 pm    Post subject:
Reply with quote

use VPUT & VGET with PROFILE.

o.
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts I am unable to use SWAPBAR ON command... mrsidhu12 TSO/ISPF 3 Thu Sep 01, 2016 1:10 pm


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