| View previous topic :: View next topic |
| Author |
Message |
Ekta Sharma
Joined: 26 Feb 2008
Posts: 32
Location: pune
|
| Posted: Fri Jul 18, 2008 11:39 am Post subject: How to handle input entered on ISPF panel dynamically? |
|
|
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 |
|
ofer71
Joined: 27 Dec 2005
Posts: 1930
Location: Israel
|
| Posted: Fri Jul 18, 2008 12:03 pm Post subject: |
|
|
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
Joined: 26 Feb 2008
Posts: 32
Location: pune
|
| Posted: Fri Jul 18, 2008 12:14 pm Post subject: |
|
|
| 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 |
|
ofer71
Joined: 27 Dec 2005
Posts: 1930
Location: Israel
|
| Posted: Fri Jul 18, 2008 8:32 pm Post subject: |
|
|
If you have the dataset name, you can use (for example) the EDIT ISPF Service to edit the dataset.
O. |
|
| Back to top |
|
Pedro
Joined: 01 Sep 2006
Posts: 510
Location: work
|
| Posted: Fri Jul 18, 2008 9:27 pm Post subject: Reply to: How to handle input entered on ISPF panel dynamica |
|
|
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
Joined: 26 Feb 2008
Posts: 32
Location: pune
|
| Posted: Mon Jul 21, 2008 3:12 pm Post subject: |
|
|
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
Joined: 14 Mar 2007
Posts: 3082
Location: italy
|
| Posted: Mon Jul 21, 2008 3:18 pm Post subject: Reply to: How to handle input entered on ISPF panel dynamica |
|
|
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
Joined: 26 Feb 2008
Posts: 32
Location: pune
|
| Posted: Mon Jul 21, 2008 3:28 pm Post subject: |
|
|
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
Joined: 27 Dec 2005
Posts: 1930
Location: Israel
|
| Posted: Mon Jul 21, 2008 3:30 pm Post subject: |
|
|
Have you thought about using TRACE?
O. |
|
| Back to top |
|
enrico-sorichetti
Joined: 14 Mar 2007
Posts: 3082
Location: italy
|
| Posted: Mon Jul 21, 2008 3:35 pm Post subject: Reply to: How to handle input entered on ISPF panel dynamica |
|
|
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
Joined: 26 Feb 2008
Posts: 32
Location: pune
|
| Posted: Mon Jul 21, 2008 3:49 pm Post subject: |
|
|
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
Joined: 27 Dec 2005
Posts: 1930
Location: Israel
|
| Posted: Mon Jul 21, 2008 3:52 pm Post subject: |
|
|
The || sign should be outside the quotes, just as in Enrico's example.
O. |
|
| Back to top |
|
enrico-sorichetti
Joined: 14 Mar 2007
Posts: 3082
Location: italy
|
| Posted: Mon Jul 21, 2008 3:53 pm Post subject: Reply to: How to handle input entered on ISPF panel dynamica |
|
|
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
Joined: 26 Feb 2008
Posts: 32
Location: pune
|
| Posted: Mon Jul 21, 2008 3:55 pm Post subject: |
|
|
I have tried both the symbols !! as well as ||
"ISPEXEC EDIT DATASET("'¦¦EDIT_THIS¦¦(¦¦ MEM1 ¦¦)'")" |
|
| Back to top |
|
enrico-sorichetti
Joined: 14 Mar 2007
Posts: 3082
Location: italy
|
| Posted: Mon Jul 21, 2008 3:59 pm Post subject: Reply to: How to handle input entered on ISPF panel dynamica |
|
|
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 |
|
| |