Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"includes" (or something alike) in PANELS ?

53 views
Skip to first unread message

thoma...@swedbank.se

unread,
Sep 28, 2011, 8:20:18 AM9/28/11
to
Hi,

I would like to have a way to do the parallel to includes/copys in e g COBOL pgms but for panels (or a better parallel would be "subcalls").
Is there any way/function to this ?
(I have several panels with exact the same content, only the name differs. I would like to maintain the code in only one place.)

(I'm not interested (for this question) in "preprocessing" the panels.)



Regards,
Thomas Berg
_________________________________________
Thomas Berg Specialist A M SWEDBANK

Steve Coalbran

unread,
Sep 28, 2011, 8:44:20 AM9/28/11
to
Hej Thomas,

NOT ONLY?

Do I assume that *REXX sections do not fit here.
Use a REXX external procedure - I think I put examples on this forum before?

*REXX(*,list of values checked,(external procedure))

or - imagine the external rexx function is called 'SWEBRX01'

&VALUES = 'varname1,varname2,varname3,varname4,'
*REXX(*,&VALUES,(SWEBRX01))

ALSO

I don't know if Swedbank ever got IPT installed, I got pushed out of any dealings there by SWG.
But IPT comes with PEL (Panel Extension Language) that not only allows you to do INCLUDE of panel sections but also various conditional statements for skipping or including sections of a panel based on current "ISPF version" or other "Environment Variables". See Chapter 12 of IPT manual (SC14-7221-01 - I can send one privately if you have it installed and can't get the Book?).


> Date: Wed, 28 Sep 2011 14:19:53 +0200
> From: thoma...@SWEDBANK.SE
> Subject: "includes" (or something alike) in PANELS ?
> To: ISP...@LISTSERV.ND.EDU

Steve Coalbran

unread,
Sep 28, 2011, 8:46:25 AM9/28/11
to
Ignore the last ',' on my &VALUES assignment !!!

> Date: Wed, 28 Sep 2011 12:43:57 +0000
> From: coal...@HOTMAIL.COM
> Subject: Re: "includes" (or something alike) in PANELS ?
> To: ISP...@LISTSERV.ND.EDU
>
> Hej Thomas,
>
> NOT ONLY?
>
> Do I assume that *REXX sections do not fit here.
> Use a REXX external procedure - I think I put examples on this forum before?
>
> *REXX(*,list of values checked,(external procedure))
>
> or - imagine the external rexx function is called 'SWEBRX01'
>
> &VALUES = 'varname1,varname2,varname3,varname4,'
> *REXX(*,&VALUES,(SWEBRX01))
>
trimmed....

Rob Scott

unread,
Sep 28, 2011, 8:52:13 AM9/28/11
to
There is a way of doing this if your panels are in DTL format.

If not, I do not believe there is anything standard supplied in ISPF for non-DTL panels.

Personally, I use a simple file-tailouring REXX exec to "build" my panels and this enables me to combine pseudo copybooks for common ISPF panel defs (eg ATTRs) using the ")IM" function.

I have integrated this into my SCLM build process and it has been working fine for last 10 years.

Rob Scott
Lead Developer
Rocket Software
275 Grove Street * Newton, MA 02466-2272 * USA
Tel: +1.617.614.2305
Email: rsc...@rs.com
Web: www.rocketsoftware.com

Steve Coalbran

unread,
Sep 28, 2011, 8:56:41 AM9/28/11
to
Just as I always suspected Rob!
ISPF is "Rocket" Science!
Nice combination using it in SCLM!
Sadly this sounds like something Thomas doesn't want to consider ....yet!?
/S

> Date: Wed, 28 Sep 2011 12:51:37 +0000
> From: RSc...@ROCKETSOFTWARE.COM
> Subject: Re: "includes" (or something alike) in PANELS ?
> To: ISP...@LISTSERV.ND.EDU

Steve Coalbran

unread,
Sep 28, 2011, 9:00:13 AM9/28/11
to
Hej igen Thonmas...

Swedbank can get the IPT Trial Version for FREE.
IF the company shows "real interest"
we can arrange a
"web-meeting" demo in your environment.


/S
> Date: Wed, 28 Sep 2011 14:19:53 +0200
> From: thoma...@SWEDBANK.SE
> Subject: "includes" (or something alike) in PANELS ?
> To: ISP...@LISTSERV.ND.EDU

thoma...@swedbank.se

unread,
Sep 28, 2011, 9:05:35 AM9/28/11
to
Hi Steve,

No, external rexxes does not fit.
That would be worse: I would have the panels anyway PLUS the rexx(es).

These panels is of the menu type and uses inline rexx code in both )INIT and )PROC sections. They reads a data set with underlying data and format a dynamic area in the panel with menu selections etc. The data is in members with same name as the panel (&ZPANELID).

But a nice try! :)

(No we don't have IPT - as far as I know, and I should.)


 
Regards,
Thomas Berg
_________________________________________
Thomas Berg   Specialist   A M   SWEDBANK



> -----Ursprungligt meddelande-----
> Från: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] För Steve
> Coalbran
> Skickat: den 28 september 2011 14:44
> Till: ISP...@LISTSERV.ND.EDU
> Ämne: Re: "includes" (or something alike) in PANELS ?

thoma...@swedbank.se

unread,
Sep 28, 2011, 9:09:40 AM9/28/11
to
If we can get IPT for FREE we would be "real interested"! ;)
(The "Trial Version" part we would like to skip... :) )

Every penny here must have a "business case"...


 
Regards,
Thomas Berg
_________________________________________
Thomas Berg   Specialist   A M   SWEDBANK


> -----Ursprungligt meddelande-----
> Från: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] För Steve
> Coalbran
> Skickat: den 28 september 2011 15:00
> Till: ISP...@LISTSERV.ND.EDU
> Ämne: Re: "includes" (or something alike) in PANELS ?

Baldon, David

unread,
Sep 28, 2011, 9:13:15 AM9/28/11
to
As of z/OS 1.11 you have this capability;
The DM component of ISPF includes the following new functions and
enhancements:

o The new )INEXIT panel processing statement allows a panel source
statement input exit to be specified. The input exit can perform
dynamic modification of the ISPF panel. The exit is passed each panel
source record as it is read by ISPF and is able to change, insert, or
delete panel source records.

Using the insert functionality you could insert the common panel source.

...David

-----Original Message-----
From: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] On Behalf Of thoma...@SWEDBANK.SE

Sent: Wednesday, September 28, 2011 7:20 AM
To: ISP...@LISTSERV.ND.EDU
Subject: "includes" (or something alike) in PANELS ?

Steve Coalbran

unread,
Sep 28, 2011, 9:19:56 AM9/28/11
to
I wrote a method that uses the data defined within the same panels to build dynamic areas with shadow variables.
You have the normal panel...
)BODY
...

... |D1,S1 |

...

... |D2,S2 |

...
)INIT
...

)PROC

...

)END
...plus...

)DATA
....
)SHADOW
....
)EXIT

The data+shadow sections (can be several) are ignored by ISPF
They might be...
)DATA FIELD(D1)

ABCDEF

)SHADOW(S1)

RPYGBT
)DATA FIELD(D2)


ZYZDATA


)SHADOW(S2)


RRRGGGG
)EXIT


where the shadow defins the COLORs in CHAR attributes.
I'm sure anyone could code the necessary field-build logic so I'll skip that.

Maybe something like you have ... same but different? ;-)



> Date: Wed, 28 Sep 2011 15:04:52 +0200
> From: thoma...@SWEDBANK.SE
> Subject: SV: "includes" (or something alike) in PANELS ?

thoma...@swedbank.se

unread,
Sep 28, 2011, 9:21:16 AM9/28/11
to
How short can the code be in a panel using an )INEXIT exit ?

(I'm now using inline rexx to create a dynamic area in the panel.)


 
Regards,
Thomas Berg
_________________________________________
Thomas Berg   Specialist   A M   SWEDBANK




> -----Ursprungligt meddelande-----
> Från: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] För Baldon,
> David
> Skickat: den 28 september 2011 15:13
> Till: ISP...@LISTSERV.ND.EDU
> Ämne: Re: "includes" (or something alike) in PANELS ?

Steve Coalbran

unread,
Sep 28, 2011, 9:23:03 AM9/28/11
to
I will investigate! :-D

> Date: Wed, 28 Sep 2011 08:12:35 -0500
> From: David_...@BMC.COM
> Subject: Re: "includes" (or something alike) in PANELS ?
> To: ISP...@LISTSERV.ND.EDU
>
> As of z/OS 1.11 you have this capability;
> The DM component of ISPF includes the following new functions and
> enhancements:
>
> o The new )INEXIT panel processing statement allows a panel source
> statement input exit to be specified. The input exit can perform
> dynamic modification of the ISPF panel. The exit is passed each panel
> source record as it is read by ISPF and is able to change, insert, or
> delete panel source records.
>
> Using the insert functionality you could insert the common panel source.
>
> ...David
>
...TRIMMED...

Pedro Vera

unread,
Sep 28, 2011, 9:25:28 AM9/28/11
to
Read chapter 7 of the Dialog Guide and Reference, which describes the
)INEXIT statement. The exit can be used to insert new (or modify /
remove) lines. Also provided is a sample exit. The source can be found in
member ISPPXMNP in the ISPF samples library ISP.SISPSAMP. The )INEXIT is
fairly new, so check that your system is at the right level.

The sample supports an <IF> statement. But you may want to modify it for
an <IMBED MEMBER=panel2>


Pedro Vera
DB2 Admin Tool
http://www-01.ibm.com/software/data/db2imstools/db2tools/db2admin/

thoma...@swedbank.se

unread,
Sep 28, 2011, 9:27:14 AM9/28/11
to
BTW, maybe I could (re)use the same panel but with a sort of a parm ?
Using the OPT() kw ? Hmm...

Steve Coalbran

unread,
Sep 28, 2011, 9:34:35 AM9/28/11
to
Thanks Pedro,
Would be helpful to have an example in some language other than assembler for us mere mortals.
How about REXX or even PL/1 or COBOL!
;-D
/S

> Date: Wed, 28 Sep 2011 06:24:54 -0700
> From: pe...@US.IBM.COM
> Subject: Re: "includes" (or something alike) in PANELS ?
> To: ISP...@LISTSERV.ND.EDU
>

thoma...@swedbank.se

unread,
Sep 28, 2011, 9:38:17 AM9/28/11
to
It's not clear for me what's required as a minimum for a panel with an )INEXIT exit.
From the manual:

"The )INEXIT section, which must be specified as the *first statement* in the panel source member,..."

and:

"If a section is omitted, the corresponding header statement is also omitted. The )BODY header can be omitted if all previous sections are omitted, ... "

Could a single line with )INEXIT be enough if the exit inserts the necessary )BODY and )END sections ?


 
Regards,
Thomas Berg
_________________________________________
Thomas Berg   Specialist   A M   SWEDBANK





> -----Ursprungligt meddelande-----
> Från: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] För Pedro Vera
> Skickat: den 28 september 2011 15:25
> Till: ISP...@LISTSERV.ND.EDU
> Ämne: Re: "includes" (or something alike) in PANELS ?

Pedro Vera

unread,
Sep 28, 2011, 9:43:47 AM9/28/11
to
> (re)use the same panel but with a sort of a parm ?

You originally said the content was the same, but the names were
different... I had assumed that you could not change the callers of the
panel. But if all of that is true, why can't you just use the same
member?

All of the panel sections already support IF statements. And the body
allows you to include variables... you should be able to customize the
body from the )INIT section.

Pedro Vera

unread,
Sep 28, 2011, 10:00:11 AM9/28/11
to
> what's required as a minimum for a panel

It is not clear to me either, but I suspect that the rule you cite is a
guideline for you as you develop panels. My guess is that panel syntax is
not checked until after the INEXIT has completed.

thoma...@swedbank.se

unread,
Sep 28, 2011, 10:37:34 AM9/28/11
to
Yes, but I want to minimize the code change in the calling panels/cmds.
(And not have caller dependent code in the called panel.)
(So I never have to change the code in the panel when a new menu is needed. Just update the data in the dataset.)

Ideally would only the calling SELECT PANEL() be affected, e g through the "OPT()" option.
But so far I haven't got that working.



Regards,
Thomas Berg
_________________________________________
Thomas Berg�� Specialist�� A M�� SWEDBANK

> -----Ursprungligt meddelande-----
> Fr�n: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] F�r Pedro Vera
> Skickat: den 28 september 2011 15:42
> Till: ISP...@LISTSERV.ND.EDU
> �mne: Re: SV: "includes" (or something alike) in PANELS ?

thoma...@swedbank.se

unread,
Sep 28, 2011, 11:19:23 AM9/28/11
to
I have landed in the solution with the calling panel/function does:

"SELECT PANEL(MENU) OPT(menuname)"

..where the only thing that differs is 'menuname'. (As far as panels and callers matters.)

Per

unread,
Sep 28, 2011, 11:52:05 AM9/28/11
to
Samplib also contains an example on how to use include in panels.
Tested it, and found one error at first try: two include in sequence ignores the second.

Regards

Per Kragøe

thoma...@swedbank.se

unread,
Sep 30, 2011, 9:06:32 AM9/30/11
to
Which member in samplib ?

TIA


 
Regards,
Thomas Berg
_________________________________________
Thomas Berg   Specialist   A M   SWEDBANK


> -----Ursprungligt meddelande-----
> Från: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] För Per
> Skickat: den 28 september 2011 17:51
> Till: ISP...@LISTSERV.ND.EDU
> Ämne: Re: SV: "includes" (or something alike) in PANELS ?
0 new messages