|
|
| Author |
Message |
Ekta Sharma
New User
Joined: 26 Feb 2008 Posts: 32 Location: pune
|
|
|
|
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 |
|
 |
References
|
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1956 Location: Israel
|
|
|
|
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 |
|
 |
Ekta Sharma
New User
Joined: 26 Feb 2008 Posts: 32 Location: pune
|
|
|
|
| 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 |
|
 |
Moved: Fri Jul 18, 2008 1:11 pm by superk From CLIST & REXX to TSO/ISPF |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1956 Location: Israel
|
|
|
|
If you have the dataset name, you can use (for example) the EDIT ISPF Service to edit the dataset.
O. |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 530 Location: work
|
|
|
|
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 |
|
 |
Ekta Sharma
New User
Joined: 26 Feb 2008 Posts: 32 Location: pune
|
|
|
|
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 |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3153 Location: italy
|
|
|
|
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 |
|
 |
Ekta Sharma
New User
Joined: 26 Feb 2008 Posts: 32 Location: pune
|
|
|
|
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 |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1956 Location: Israel
|
|
|
|
Have you thought about using TRACE?
O. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3153 Location: italy
|
|
|
|
| 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 |
|
 |
Ekta Sharma
New User
Joined: 26 Feb 2008 Posts: 32 Location: pune
|
|
|
|
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 |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1956 Location: Israel
|
|
|
|
The || sign should be outside the quotes, just as in Enrico's example.
O. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3153 Location: italy
|
|
|
|
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 |
|
 |
Ekta Sharma
New User
Joined: 26 Feb 2008 Posts: 32 Location: pune
|
|
|
|
I have tried both the symbols !! as well as ||
"ISPEXEC EDIT DATASET("'¦¦EDIT_THIS¦¦(¦¦ MEM1 ¦¦)'")" |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3153 Location: italy
|
|
|
|
before the offending statement put a
put a
after
and post the trace result ( please use the code tags ) |
|
| Back to top |
|
 |
|
|