IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Panel variable model line


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
WilliamDownie

New User


Joined: 01 Jul 2020
Posts: 21
Location: UK

PostPosted: Fri Dec 31, 2021 6:28 pm
Reply with quote

I have having a problem using variable model lines. Below is a cutdown version of my panel. The purpose of the panel is to list members. Optionally, when 'descyn' set to 'Y', it will output a row containing a description of the member, and following that a static separator line.

Code:
)ATTR
# TYPE(TEXT) INTENS(LOW) SKIP(OFF)
_  TYPE(INPUT) INTENS(HIGH) CAPS(ON)
@ TYPE(OUTPUT) INTENS(LOW) COLOR(GREEN)
)BODY EXPAND(//)
Command ===>_ZCMD
+
+    Description ===>_z+
+
+Act Member
+-/-/
)MODEL ROWS(ALL)
&MDL1
&MDL2
&MDL3
)INIT
.ZVARS='(descyn ACT)'
IF (&descyn=' ') &descyn='N'
)PROC
IF (&DESCYN='N')
  &MDL1='_Z# @MemLoc                                                  '
  &MDL2='OMIT'
  &MDL3='OMIT'
ELSE
  &MDL1='_Z# @MemLoc                                                  '
  &MDL2='    @MemDsc                                                  '
  &MDL3='-------------------------------------------------------------'
)END


When I start the Dialogue (the first panel it displays is this one) it errors saying &MDL1 has not been initialised:

Code:
ISPP316
, ,
Model line not defined  ,
The variable model line has not been initialized before the display.



Panel line where error was detected:
&MDL1


Can anyone see what I am doing wrong ?
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Dec 31, 2021 8:29 pm
Reply with quote

You haven't initialized the MDL1 (and supposedly neither MLD2 nor MDL3) before display. What you show in the panel is setting the variables in the PROC section, which runs after the display. You my try setting the variables in the INIT section, though I seem to remember that model lines must be defined prior to the TBDISPL command.
Back to top
View user's profile Send private message
WilliamDownie

New User


Joined: 01 Jul 2020
Posts: 21
Location: UK

PostPosted: Fri Dec 31, 2021 9:12 pm
Reply with quote

Thanks Willy, that was the problem. What I have done is to initialise the variable model lines in my dialogue code, before doing the "DISPLAY PANEL(xxxxxx)".
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Jan 06, 2022 12:37 am
Reply with quote

The sections of the panel )BODY, )INIT, and )PROC have to occur in that order in the panel member. But you should think of it that they are executed in this order:

Code:

1. driving program code
2. )INIT section code
3. )BODY
4. )PROC section code
5. more driving program code
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Variable Output file name DFSORT/ICETOOL 8
Search our Forums:

Back to Top