View previous topic :: View next topic
|
Author |
Message |
epicdave
New User
Joined: 11 Oct 2007 Posts: 20 Location: New York
|
|
|
|
Hola!
I'm developing an interface using ISPF to parse the output of an in-house tool. I'm trying to figure out the ISPF Dialog Tag Language but have run into a snag. I can't for the life of me to get a user-supplied value to be passed from the panel to the Rexx exec that's driving the tool. I've got all the IBM pubs and am working with a sample I found in the DTL book. Here's the panel I'm using:
Code: |
<!DOCTYPE DM SYSTEM>
<VARCLASS NAME=VARC TYPE='CHAR 10'>
<VARLIST>
<VARDCL NAME=DEST VARCLASS=VARC>
<VARDCL NAME=PLACE VARCLASS=VARC>
</VARLIST>
<PANEL NAME=MAINPAN1 CURSOR=PLACE>TRAVEL AGENCY
<SELFLD NAME=DEST SELWIDTH=50 PMTWIDTH=15>DESTINATIONS:
<CHOICE>LONDON
<CHOICE>MADRID
<CHOICE>PARIS
<CHOICE>ZURICH
</SELFLD>
<DIVIDER TYPE=SOLID>
<DTAFLD DATAVAR=PLACE ENTWIDTH=9 PMTWIDTH=5>OTHER
<CMDAREA>
</PANEL>
|
and here is the exec I'm using to drive the thing:
Code: |
/*REXX*/
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('DATASET NAME HERE')"
DISPLAY PANEL'(MAINPAN1)'
"VGET PLACE PROFILE"
SAY "DEST IS: "PLACE
|
I looked into the ISPF guide and it looks like VGET should, by default, be looking at both the SHARED and APPLICATION pools for the variable name. The panel displays correctly, but I can't get the any user-supplied values to pass from the panel to the exec for manipulation. I know there has to be a way to do this, but I can't seem to get it from the pubs.
Thanks in advance for your help!!! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
usually after a panel display there should not be the need to "VGET" the panels variables.
to debug I would go to :
dialog test
set a brekpoint at DISPLAY
look at the variables before and after |
|
Back to top |
|
|
epicdave
New User
Joined: 11 Oct 2007 Posts: 20 Location: New York
|
|
|
|
Enrico,
Thanks for the quick reply! I did what you suggested and here is what I got: (sorry for the weird tabs, I cut and pasted directly from the terminal session)
Code: |
Current scrollable width of variable
Variable P A Value
----+----1----+---
DEST I
PLACE I TEST
ZCMD I
ZCURFLD I PLACE
ZCURPOS I 0001
Z S N
ZACCTNUM S H ******,B
ZAPLCNT S N 0000
ZAPPLID S N ISR
ZBDMXCNT S N 000000000
ZCFGCMPD S N 2007/05/18
ZCFGCMPT S N 22:18 |
If I'm reading this correctly, the value "TEST" is being placed in a variable called "PLACE" Given that, I still don't understand why the Rexx exec doesn't produce the same value. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
get rid of the VGET and put something like
"say "place ==>" || place || "<=="
see what happens...
I just checked one of my dialogs,
never used the vget after a "display panel" |
|
Back to top |
|
|
epicdave
New User
Joined: 11 Oct 2007 Posts: 20 Location: New York
|
|
|
|
Enrico,
I got rid of the VGET statement and it looks like things work. That's pretty wild that the VGET statement is not needed in DTL...wish the pubs mentioned that somewhere
Anyway, thank you for your help!!
-David |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
It is not an issue of dtl,
a panel written in DTL, is just panel, with additional capabilities
to make somewhat CUA compatible
the approach ISPF has about dialog variables for ispf services
is that there is no need to VGET them after the service has been
invoked,
I am almost 100% that it always is this way,
the converse is not true sometimes to achieve some results
You have to VPUT the relevant variable, but, to the SHARED pool
I do not remember where, but somewhere it is documented |
|
Back to top |
|
|
epicdave
New User
Joined: 11 Oct 2007 Posts: 20 Location: New York
|
|
|
|
Enrico,
It looks like I didn't understand what the purpose of VGET and VPUT. I spent some time creating sample panels and experimenting, and have a much better understanding of what's going on under the hood.
Thanks again for your help
-David |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Any time You want to talk about ISPF ( not DTL please !! )
and Rexx Just post and somebody will reply |
|
Back to top |
|
|
pauly_william
New User
Joined: 15 Oct 2007 Posts: 27 Location: Canada
|
|
|
|
In this example, will the value of "PLACE" always be the numeric selection e.g. 1,2,3,4?
Is there a way the value passed will be a string? Like "London"? |
|
Back to top |
|
|
|