View previous topic :: View next topic
|
Author |
Message |
malathy_tv
New User
Joined: 29 May 2007 Posts: 34 Location: chennai
|
|
|
|
Can any one please let me know how do we create panels dynamically? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
What do you mean by "dynamically"? Can you give an example? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Since ISPF panels are basically members of PDS, and since you can create PDS members dynamically - the answer is yes.
O. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
If you mean "create a panel on-the-fly before displaying it in my program",
Then, as Ofer says, the answer is yes.
However, panel contents is dynamic, that's why you have variables inside.
So you can have a single panel which contents will be completely different each time you display it.
If you mean "create a panel just by drawing it, the panel code will be dynamically generated",
Then, well, panels are pretty much like screen drawings, so there is not much use for such a tool.
Please rephrase your question, so we can answer to the point. |
|
Back to top |
|
|
malathy_tv
New User
Joined: 29 May 2007 Posts: 34 Location: chennai
|
|
|
|
Hi,
say i want to diplay a panels as below and this may vary as many employees are there. hence i cannot design a static screen like at max only 20 employees so i need to design screen dynamically which will repeat so many employess are there
Panel:
name empid
axx 10001
bxx 10002
cxx 10003
i dont want a static code like this:
#nam1 #emp1
#nam2 #emp2
#nam2 #emp3
i need this code to vary with the number of employees.
this is my question. please help on the same |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
In the panel, use the )MODEL to define a scrollable area.
Use an ISPF table to save the data (one row in the table = one row on the screen).
Use TBDISPL instead of DISPLAY.
For more information, search the forum (and/or the internet) for TBDISPL or )MODEL. |
|
Back to top |
|
|
malathy_tv
New User
Joined: 29 May 2007 Posts: 34 Location: chennai
|
|
|
|
can you please tell me how is )MODEL and ISPF tables connected. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
As Marso said, use TBDISPL service instead of DISPLAY. It will provide a scrollable panel. And the panel should have )MODEL section.
Your panel would look something like this:
Code: |
)BODY EXPAND(//)
// Some Heading //
Command ==>_ZCMD +
Employee Name Employee id
)MODEL
_EMPNAME _EMPID +
|
Where the variables in the model section are the same variables as are used in the ISPF table. |
|
Back to top |
|
|
vidyaa
New User
Joined: 02 May 2008 Posts: 77 Location: chennai
|
|
|
|
Thank you so much |
|
Back to top |
|
|
|