IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to handle input entered on ISPF panel dynamically?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Fri Jul 18, 2008 12:03 pm
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
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: 2358
Location: Israel

PostPosted: Fri Jul 18, 2008 8:32 pm
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

Global Moderator


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

PostPosted: Fri Jul 18, 2008 9:27 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 3:18 pm
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
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: 2358
Location: Israel

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

Have you thought about using TRACE?

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 3:35 pm
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
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: 2358
Location: Israel

PostPosted: Mon Jul 21, 2008 3:52 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 3:53 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 3:59 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jul 21, 2008 4:20 pm
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
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: 2358
Location: Israel

PostPosted: Mon Jul 21, 2008 4:40 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
Search our Forums:

Back to Top