View previous topic :: View next topic
|
Author |
Message |
bhuspin
New User
Joined: 13 Aug 2008 Posts: 26 Location: chennai
|
|
|
|
How to give a input from a rexx program to a panel |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
.... to a ISPF panel.
via ispexec VPUT.
Check manual. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
It should work by using the same variable names. Assign values in the rexx program and use the same names in the panel. In the panel, variables are identified when they are preceeded by an ampersand or an attribute character. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Bhuspin,
Just a thought.
Quote: |
How to give a input from a rexx program to a panel |
If a field value is sent from the program to the panel (assuming that the field names are same) then its actually an OUTPUT rather than an input. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Bhuspin,
Say you have a fields named DESCR and VALDV in the panel and you want to move values to the field.
Use the same fields in the REXX program and populate it.
Code: |
IF DESCR = 'HOST_VAR1' THEN
DO
DESCR='YET TO UPDATE THE FIELD'
VALDV='YET TO UPDATE THE FIELD'
END |
Then when you re-display the panel the values will be reflected in the panel. |
|
Back to top |
|
|
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
I have coded in my program
STAR = '*'
On the panel when I write STAR (inside body) STAR gets printed and not *.
Need to display it on the panel. Please help.
Aaru wrote: |
Bhuspin,
Say you have a fields named DESCR and VALDV in the panel and you want to move values to the field.
Use the same fields in the REXX program and populate it.
Code: |
IF DESCR = 'HOST_VAR1' THEN
DO
DESCR='YET TO UPDATE THE FIELD'
VALDV='YET TO UPDATE THE FIELD'
END |
Then when you re-display the panel the values will be reflected in the panel. |
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Once again, it works OK for me:
Code: |
/* REXX **********************************************************/
/* Process inline panel and message definitions */
ddname = "$"Right(Time(S),7,"0")
memname = "ZZ"
"ALLOC NEW DEL F("ddname") DIR(2) SP(1) TR RECF(F B)
BLKS(0) LRECL(80) REU"
"ISPEXEC LMINIT DATAID(did) DDNAME("ddname") ENQ(EXCLU)"
"ISPEXEC LMOPEN DATAID("did") OPTION(OUTPUT)"
a = 1
Do 1 /* 1 ITERATION FOR EACH PANEL DEFINITION */
Do a = a To 999 Until Substr(line,1,8) = "/*MEMBER"
line = Sourceline(a)
End
Parse Var line . memname .
Do a = (a + 1) To 999 While Substr(line,1,2) <> "*/"
line = Sourceline(a)
"ISPEXEC LMPUT DATAID("did") MODE(INVAR)DATALOC(line) DATALEN(80)"
End
"ISPEXEC LMMADD DATAID("did") MEMBER("memname")"
End
"ISPEXEC LMFREE DATAID("did")"
"ISPEXEC LIBDEF ISPPLIB LIBRARY ID("ddname") STACK"
"ISPEXEC LIBDEF ISPMLIB LIBRARY ID("ddname") STACK"
"ISPEXEC LIBDEF ISPSLIB LIBRARY ID("ddname") STACK"
star = '*'
"ISPEXEC DISPLAY PANEL(TEST7901)"
Exit 0
/*MEMBER TEST7901
)Attr Default(%+_)
$ Type(Input) Intens(Low) Pad(_) Caps(Off)
_ Type(Input) Intens(Low) Pad(_) Caps(On)
! Type(Input) Intens(Low) Pad(' ') Caps(Off)
` Type(Output) Intens(High)
# Type(Output) Intens(Low)
)Body Expand(//) Width(80) Cmd()
%/-/ Panel Title /-/+
+Command%=>_zcmd
+
$star+
+
)Init
)Proc
)End
*/
|
Output Results:
Code: |
SYSB ---------------------------- Panel Title --------------------------------
Command => ____________________________________________________________________
*___
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Perhaps Pragati does not realize that you have to indicate the start of a field through the use of an attribute character. Variables can also be displayed through the use of an ampersand. |
|
Back to top |
|
|
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
Thanks a lot. I got the point. |
|
Back to top |
|
|
|