Discussion:
Question ABout ISPF Panels
(too old to reply)
e***@JUNO.COM
2018-08-18 13:20:25 UTC
Permalink
Hi,.I am trying to find examples of invoking a CLIST and a Program from
the )PROC Section of a ISPF PANEL
.
I consistently get a syntax error.
.
For example:
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a CLIST
or Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
.
.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Lizette Koehler
2018-08-18 13:28:03 UTC
Permalink
I know you can use REXX

The *REXX statement is used to invoke REXX code in a panel's )INIT,
)REINIT, or )PROC section. The REXX can be coded within the panel source
immediately after the *REXX

But I am not sure if you can use a Clist.

Perhaps others will be able to provide better details.

Lizette
-----Original Message-----
Sent: Saturday, August 18, 2018 6:18 AM
Subject: Question ABout ISPF Panels
Hi,.I am trying to find examples of invoking a CLIST and a Program from the
)PROC Section of a ISPF PANEL .
I consistently get a syntax error.
.
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a CLIST or
Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
.
.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Steve Coalbran
2018-08-30 09:00:36 UTC
Permalink
You cannot issue ISPF dialog commands from within a panel's *REXX section or PANEXIT..
You will get syntax errors (or worse).
You can set values inside a *REXX section and act on them afterwards, ie...

...
&ZERRALRM = YES
&ZERRHM = MYAPPL
&CURSOR = .CURSOR
&CSRPOS = .CSRPOS
*REXX(*,ZCMD,ZERRSM,ZERRLM,CURSOR,CSRPOS)
...
...
...
*ENDREXX
REFRESH(*)
IF( &CURSOR=ZCMD ) &CSRPOS = 1
IF(&ZCMD NE '') .MSG = ISRZ002
VPUT(CURSOR,CSRPOS)
...
There is no *CLIST panel section! 😱




________________________________
From: IBM Mainframe Discussion List <IBM-***@LISTSERV.UA.EDU> on behalf of Lizette Koehler <***@MINDSPRING.COM>
Sent: 18 August 2018 13:27
To: IBM-***@LISTSERV.UA.EDU
Subject: Re: Question ABout ISPF Panels

I know you can use REXX

The *REXX statement is used to invoke REXX code in a panel's )INIT,
)REINIT, or )PROC section. The REXX can be coded within the panel source
immediately after the *REXX

But I am not sure if you can use a Clist.

Perhaps others will be able to provide better details.

Lizette
-----Original Message-----
Sent: Saturday, August 18, 2018 6:18 AM
Subject: Question ABout ISPF Panels
Hi,.I am trying to find examples of invoking a CLIST and a Program from the
)PROC Section of a ISPF PANEL .
I consistently get a syntax error.
.
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a CLIST or
Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
.
.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
ITschak Mugzach
2018-08-18 14:52:24 UTC
Permalink
What type of panel? I assune you questiob doea not relate to a Selection
panel. If it's an entry panel, try rexx exit in panel.

ITschak
Post by e***@JUNO.COM
Hi,.I am trying to find examples of invoking a CLIST and a Program from
the )PROC Section of a ISPF PANEL
.
I consistently get a syntax error.
.
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a CLIST
or Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
.
.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Peter Hunkeler
2018-08-18 17:50:02 UTC
Permalink
Post by e***@JUNO.COM
Hi,.I am trying to find examples of invoking a CLIST and a Program from
the )PROC Section of a ISPF PANEL


That is not the concept of ISPF. You either have a menu, aka selection panel, or a data entry or data display panel.


With menus, you set the ZSEL variable to contain operands which are allowed on the ISPF SELECT service. ISPF then runs a SELECT service with those operands. This way you run (compiled) program, a CLIST/REXX script, or you let ISPF display another panel.


Non-menu panel do not run programs. They are displayed *from* s running program, and the data entered, is then worked with in the program when ISPF returns from the DISPLAY service.


This is a high-level, simplified view. The point is, there is no CALL or EXEC statement in a panel.


ISPF Panels only have a very limited set of services you can use to verify the data the user has entered. With some release of ISPF (I don't remember which release), ISPF introduced the possibility to use REXX from within the panel to offer more flexibility to verify data. This was not intended to run "the logic" part of the application.


--
ßph



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Steve Beaver
2018-08-18 18:21:53 UTC
Permalink
You would be better off writing in REXX

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On
Behalf Of Peter Hunkeler
Sent: Saturday, August 18, 2018 12:49 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: AW: Question ABout ISPF Panels
Post by e***@JUNO.COM
Hi,.I am trying to find examples of invoking a CLIST and a Program from
the )PROC Section of a ISPF PANEL


That is not the concept of ISPF. You either have a menu, aka selection
panel, or a data entry or data display panel.


With menus, you set the ZSEL variable to contain operands which are allowed
on the ISPF SELECT service. ISPF then runs a SELECT service with those
operands. This way you run (compiled) program, a CLIST/REXX script, or you
let ISPF display another panel.


Non-menu panel do not run programs. They are displayed *from* s running
program, and the data entered, is then worked with in the program when ISPF
returns from the DISPLAY service.


This is a high-level, simplified view. The point is, there is no CALL or
EXEC statement in a panel.


ISPF Panels only have a very limited set of services you can use to verify
the data the user has entered. With some release of ISPF (I don't remember
which release), ISPF introduced the possibility to use REXX from within the
panel to offer more flexibility to verify data. This was not intended to run
"the logic" part of the application.


--
ßph



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
CM Poncelet
2018-08-19 03:18:35 UTC
Permalink
The Clist or program should be invoked from the )PROC section in the
panel, as the value of &ZSEL. E.g.

)BODY WIDTH(&ZSCREENW) EXPAND(//)
%-----------------------/-/-
!OPTION %===>¯ZCMD                                
)PROC
  &ZSEL = TRANS( &ZCMD
                B,'CMD(%ZBROWSE &ZTRAIL)'  /* Clist */
                T,'PGM(ISRPTC)'            /* Program */
                U,'PANEL(ISRUTIL)'         /* Panel */
                *,'' )
)END
 
Your 'PAULD01.SPEX.CLIST' should be in your SYSPROC concatenation,
unless you want to invoke a SYSPROC Clist that issues its own EX
'PAULD01.SPEX.CLIST(XGETSYS)'.
 
To invoke XGETSYS from a panel, code:

)PROC
IF (&T01 = ABX3 )
    &ZSEL = 'CMD(%XGETSYS)'
 
else see the above "&ZSEL = TRANS( &ZCMD <etc.>" to include multiple
panel options.  
 
Chris Poncelet
 
Post by e***@JUNO.COM
Hi,.I am trying to find examples of invoking a CLIST and a Program from
the )PROC Section of a ISPF PANEL
.
I consistently get a syntax error.
.
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a CLIST
or Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
.
.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Jesse 1 Robinson
2018-08-19 04:36:14 UTC
Permalink
I have an app that imbeds REXX code in a panel. The REXX code happens to be in the )Init section, but I think it could be )Proc. It has a marked beginning and end:

*REXX(*,shopcsij,shoptgtj,zedsmsg,zedlmsg)

TRACE N

IF LEFT(shopcsij,1) = "4" THEN DO
shopcsij = shopcsi1
shoptgtj = shopc1tg
RETURN
END
...
RETURN

*ENDREXX

I wrote this partly to see if I could. It works, but I don't think I'd do it again.

.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler
SHARE MVS Program Co-Manager
323-715-0595 Mobile
626-543-6132 Office ⇐=== NEW
***@sce.com

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of CM Poncelet
Sent: Saturday, August 18, 2018 8:18 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: (External):Re: Question ABout ISPF Panels

The Clist or program should be invoked from the )PROC section in the panel, as the value of &ZSEL. E.g.

)BODY WIDTH(&ZSCREENW) EXPAND(//)
%-----------------------/-/-
!OPTION %===>¯ZCMD )PROC
  &ZSEL = TRANS( &ZCMD
                B,'CMD(%ZBROWSE &ZTRAIL)'  /* Clist */
                T,'PGM(ISRPTC)'            /* Program */
                U,'PANEL(ISRUTIL)'         /* Panel */
                *,'' )
)END
 
Your 'PAULD01.SPEX.CLIST' should be in your SYSPROC concatenation, unless you want to invoke a SYSPROC Clist that issues its own EX 'PAULD01.SPEX.CLIST(XGETSYS)'.
 
To invoke XGETSYS from a panel, code:

)PROC
IF (&T01 = ABX3 )
    &ZSEL = 'CMD(%XGETSYS)'
 
else see the above "&ZSEL = TRANS( &ZCMD <etc.>" to include multiple panel options.  
 
Chris Poncelet
 
Post by e***@JUNO.COM
Hi,.I am trying to find examples of invoking a CLIST and a Program
from the )PROC Section of a ISPF PANEL .
I consistently get a syntax error.
.
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a CLIST
or Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Hobart Spitz
2018-08-19 11:40:47 UTC
Permalink
Peter cover it well.
A DISPLAYd panel cannot invoke a CLIST.
A SELECTd panel can invoke any command, CLIST, REXX EXEC, or PGM, by
setting &ZSEL.
Post by Jesse 1 Robinson
I have an app that imbeds REXX code in a panel. The REXX code happens to
be in the )Init section, but I think it could be )Proc. It has a marked
*REXX(*,shopcsij,shoptgtj,zedsmsg,zedlmsg)
TRACE N
IF LEFT(shopcsij,1) = "4" THEN DO
shopcsij = shopcsi1
shoptgtj = shopc1tg
RETURN
END
...
RETURN
*ENDREXX
I wrote this partly to see if I could. It works, but I don't think I'd do it again.
.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler
SHARE MVS Program Co-Manager
323-715-0595 Mobile
626-543-6132 Office ⇐=== NEW
-----Original Message-----
Behalf Of CM Poncelet
Sent: Saturday, August 18, 2018 8:18 PM
Subject: (External):Re: Question ABout ISPF Panels
The Clist or program should be invoked from the )PROC section in the
panel, as the value of &ZSEL. E.g.
)BODY WIDTH(&ZSCREENW) EXPAND(//)
%-----------------------/-/-
!OPTION %===>¯ZCMD )PROC
&ZSEL = TRANS( &ZCMD
B,'CMD(%ZBROWSE &ZTRAIL)' /* Clist */
T,'PGM(ISRPTC)' /* Program */
U,'PANEL(ISRUTIL)' /* Panel */
*,'' )
)END
Your 'PAULD01.SPEX.CLIST' should be in your SYSPROC concatenation, unless
you want to invoke a SYSPROC Clist that issues its own EX
'PAULD01.SPEX.CLIST(XGETSYS)'.
)PROC
IF (&T01 = ABX3 )
&ZSEL = 'CMD(%XGETSYS)'
else see the above "&ZSEL = TRANS( &ZCMD <etc.>" to include multiple panel
options.
Chris Poncelet
Post by e***@JUNO.COM
Hi,.I am trying to find examples of invoking a CLIST and a Program
from the )PROC Section of a ISPF PANEL .
I consistently get a syntax error.
.
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a CLIST
or Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Jesse 1 Robinson
2018-08-19 15:28:24 UTC
Permalink
I don't want to belabor the point. Well, OK, maybe a bit. The REXX-embedded panel I sampled from has no mention of ZSEL at all. The REXX stuff is in the )Init section. The panel itself is displayed by a REXX:

"DISPLAY PANEL(SHOPORD1)"

As I said before, I would not necessarily recommend panel-embedded REXX, but it works. I last updated this app in 2005 and use it frequently to pull PTFs via RECEIVE ORDER.

.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler
SHARE MVS Program Co-Manager
323-715-0595 Mobile
626-543-6132 Office ⇐=== NEW
***@sce.com


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Hobart Spitz
Sent: Sunday, August 19, 2018 4:40 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: (External):Re: Question ABout ISPF Panels

Peter cover it well.
A DISPLAYd panel cannot invoke a CLIST.
A SELECTd panel can invoke any command, CLIST, REXX EXEC, or PGM, by setting &ZSEL.
Post by Jesse 1 Robinson
I have an app that imbeds REXX code in a panel. The REXX code happens
to be in the )Init section, but I think it could be )Proc. It has a
*REXX(*,shopcsij,shoptgtj,zedsmsg,zedlmsg)
TRACE N
IF LEFT(shopcsij,1) = "4" THEN DO
shopcsij = shopcsi1
shoptgtj = shopc1tg
RETURN
END
...
RETURN
*ENDREXX
I wrote this partly to see if I could. It works, but I don't think I'd
do it again.
.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler
SHARE MVS Program Co-Manager
323-715-0595 Mobile
626-543-6132 Office ⇐=== NEW
-----Original Message-----
On Behalf Of CM Poncelet
Sent: Saturday, August 18, 2018 8:18 PM
Subject: (External):Re: Question ABout ISPF Panels
The Clist or program should be invoked from the )PROC section in the
panel, as the value of &ZSEL. E.g.
)BODY WIDTH(&ZSCREENW) EXPAND(//)
%-----------------------/-/-
!OPTION %===>¯ZCMD )PROC
&ZSEL = TRANS( &ZCMD
B,'CMD(%ZBROWSE &ZTRAIL)' /* Clist */
T,'PGM(ISRPTC)' /* Program */
U,'PANEL(ISRUTIL)' /* Panel */
*,'' )
)END
Your 'PAULD01.SPEX.CLIST' should be in your SYSPROC concatenation,
unless you want to invoke a SYSPROC Clist that issues its own EX
'PAULD01.SPEX.CLIST(XGETSYS)'.
)PROC
IF (&T01 = ABX3 )
&ZSEL = 'CMD(%XGETSYS)'
else see the above "&ZSEL = TRANS( &ZCMD <etc.>" to include multiple
panel options.
Chris Poncelet
Post by e***@JUNO.COM
Hi,.I am trying to find examples of invoking a CLIST and a Program
from the )PROC Section of a ISPF PANEL .
I consistently get a syntax error.
.
)PROC
IF (&T01 = ABX3 )
EX 'PAULD01.SPEX.CLIST(XGETSYS)'
.
My first question would be, is it legitimate to invoke either a
CLIST or Assembler Program from the )PROC section of a PANEL ?
.
And secondly could some one post an example of each ?
.
.
Paul
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
w***@gmail.com
2018-08-19 20:57:12 UTC
Permalink
You can run an external clist from a REXX section of a PROC panel section, i.e the following, where CHELLO is a clist.

*REXX (zcmd)
if translate(zcmd)='T' then address tso "%CHELLO"
*ENDREXX

One major caveat, you cannot use any ISPF services in neither the imbedded REXX, nor in the called clist.

And using the zsel variable in a proper selection panel is still the recommended method.
Larry Zuckett
2018-08-20 14:10:55 UTC
Permalink
Hi ESSTEAM,

If you are are using Options on your panel, then you can set &ZCMD to the rexx or clist routine you would like to execute.

)Body width(80) expand(\\)
%--\-\--
%--\-\-- IBM APPLICATION DEVELOPMENT TOOLS --\-\--
%--\-\--
+Command %===>_ZCMD
+
+ %1)+ IBM Application Performance Analyzer
+ %2)+ IBM Debug Tool
+ %3)+ IBM Fault Analyzer
+ %4)+ IBM File Manager
+ %5)+ IBM File Manager for DB2
+ %6)+ IBM File Manager for IMS
+ %7)+ IBM Workload Simulator - Test Manager
+
+ Enter Option and Press %ENTER+ to continue or %PF3 (CANCEL) to exit.
)INIT
)PROC
&ZSEL = TRANS( TRUNC (&ZCMD,'.')
1,'CMD(EX ''SYS1.SCAZEXEC(CAZISPS)'') MODE(FSCR) NEWAPPL(CAZ3)'
2,'CMD(EX ''SYS1.SEQAEXEC(EQASTART)'' ''PUMEMBER(EQAZ&ZSYSID.)'')'
3,'CMD(%IDISISPF)'
4,'CMD(%FMMENU)'
5,'CMD(%FMMENU MPANEL(FMN2ST00) APPL(FMN2))'
6,'CMD(%FMMENU MPANEL(FMN1ST00) APPL(FMN1))'
7,'CMD(%WSIMTM)'
X,EXIT
*,'?'
)
&ZTRAIL=.TRAIL
)END

However, if you had something like this where you are prompting for value and executing a REXX routine based on that value, then you can do the following:

)Attr Default(%+_)
@ type(text) intens(high) caps(off) just(left ) hilite(blink)
¬ type(input) intens(non)
_ type(input) intens(high) caps(off)
~ type(input) intens(high) caps(on)
)Body width(80) expand(\\)
%--\-\-- SAMPLE OPTION PANEL --\-\--
+Command %===>_ZCMD + Enter %MODEL+ for templates
+
+ %ENTER "OPT1" or "OPT2"
+ %_c1 + Enter "OPT1" or "OPT2"
+
+ Press %ENTER+ to continue or %PF3 (CANCEL) to exit.
)INIT
.cursor = ZCMD
&msg = &Z
&p1 = &Z
)REINIT
)PROC
&C1 = UPPER(C1)
VER (&C1 NONBLANK LIST,OPT1,OPT2)
if (&C1 = 'OPT1')
&ZSEL = 'CMD(OPTION1)'
if (&C1 = 'OPT2')
&ZSEL = 'CMD(OPTION2)'
)END

Rexx routines OPTION1 and OPTION2 are in my SYSEXEC concatenation:

OPTION1:

/* REXX */

say 'executing option 1 rexx routine'
exit

OPTION2:

/* REXX */

say 'executing option 2 rexx routine'
exit

From ISPF OPTION 7.1 select TESTPANL:

SYA1 Invoke Dialog Function/Selection Panel
Command ===>
More: +
Invoke selection panel:
PANEL . . TESTPANL

gives you the display:

Select "OPT1" or "OPT2":

SYA1 ------------------------ SAMPLE OPTION PANEL -----------------------------
Command ===> Enter MODEL for templates

ENTER "OPT1" or "OPT2"
Enter "OPT1" or "OPT2"

Press ENTER to continue or PF3 (CANCEL) to exit.

will then call the appropriate rexx routine:

executing option 1 rexx routine
***







----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Larry Zuckett
2018-08-20 14:22:12 UTC
Permalink
Hi Paul,

You can also do this form of the execute if you don't want it defined in the SYSEXEC concatenation:

&C1 = UPPER(C1)
VER (&C1 NONBLANK LIST,OPT3,OPT4)
if (&C1 = 'OPT3')
&ZSEL = 'CMD(EX ''SDTS003.CLIST.CLIST(OPTION3)'')'
if (&C1 = 'OPT4')
&ZSEL = 'CMD(EX ''SDTS003.CLIST.CLIST(OPTION4)'')'
)END

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...