|
|
| Author |
Message |
malathy_tv
New User
Joined: 29 May 2007 Posts: 23 Location: chennai
|
|
|
|
| Can any one please let me know how do we create panels dynamically? |
|
| Back to top |
|
 |
References
|
Posted: Tue May 06, 2008 3:29 pm Post subject: Re: Creating panels dynamically |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3081 Location: Charlotte,NC USA
|
|
|
|
| What do you mean by "dynamically"? Can you give an example? |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1867 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
Active User
Joined: 13 Mar 2006 Posts: 288 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: 23 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
Active User
Joined: 13 Mar 2006 Posts: 288 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: 23 Location: chennai
|
|
|
|
| can you please tell me how is )MODEL and ISPF tables connected. |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 302 Location: work
|
|
|
|
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: 36 Location: chennai
|
|
|
|
| Thank you so much |
|
| Back to top |
|
 |
|
|