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

Dynamic Input fields in Panel


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

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Thu Nov 07, 2013 12:30 pm
Reply with quote

Hi Team,

I was trying the dynamic variable in a panel.

Panel Definition:
Code:

@  AREA(DYNAMIC) SCROLL(ON) EXTEND(ON)       
*  TYPE(INPUT) COLOR(RED) INTENS(LOW) CAPS(ON) HILITE(USCORE)     
"  TYPE(TEXT) COLOR(GREEN) INTENS(LOW) SKIP(ON)     
...
@DYNVAR                                                      @ 


In REXX code I want three input fields as follows :
Code:

DYNVAR = '" "SEGMENT FLD2 :*Z       "OP:"*Z"VALUE:"*Z               ""'


But in the screen the characters in used in the panel got displayed as such and I didnt get any input fields.
Output :
Code:

" "SEGMENT FLD2 :*Z       "OP:"*Z"VALUE:"*Z               ""           



Please advise.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Nov 07, 2013 1:04 pm
Reply with quote

PLease explain exactly what it is that you want to do - in detail
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Thu Nov 07, 2013 1:42 pm
Reply with quote

I want multiple lines of the above values like
SEGMENT FLD1 : ......... OP: ..... Value : .....................
SEGMENT FLD2 : ......... OP: ..... Value : .....................
SEGMENT FLD3 : ......... OP: ..... Value : .....................
SEGMENT FLD4 : ......... OP: ..... Value : .....................

The no. of rows I want can be known at run time only.

So expecting suggestions on why the dynamic var value is not shown as expected eventhough i assigned it.
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Thu Nov 07, 2013 2:12 pm
Reply with quote

Hi,

Have seen this excellent tutorial by David which solved my problem. May be useful to somebody else :

davideellis.wordpress.com/2013/04/19/dynanic-ispf-panels/
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Nov 07, 2013 10:52 pm
Reply with quote

Quote:
The problem is that you have not read the manuals

I think that for the case of dynamic areas, that it is possible to read the manuals and still not understand how to use them effectively.

You need to read about 'shadow variables'. The dynamic area can be specified by two variables. The first variable is the text to be shown (see dyntext in example). The second variable has the attributes for the text (see dynshad in example). The tricky part is that the first variable can also have attribute characters. Actually, it is all kind of tricky.

Below is my example. When you modify the top section of the panel and press Enter, the dynamic area will change. I like this example because the input area is in turquoise but when you type into it, the color changes to yellow in a similar fashion to how the ISPF editor works.

the panel:
Code:

)ATTR                                                                 
 _ TYPE(INPUT) HILITE(USCORE) COLOR(TURQ) CAPS(OFF)                   
 @ TYPE(INPUT) HILITE(USCORE) COLOR(TURQ)                             
 ` AREA(DYNAMIC) EXTEND(ON) SCROLL(ON)                               
 $ TYPE(DATAIN)   HILITE(&IHILITE) COLOR(YELLOW)                     
 ~ TYPE(CHAR)     HILITE(&IHILITE) COLOR(&ICOLOR)                     
 ¬ TYPE(DATAOUT)  HILITE(&PHILITE) COLOR(&PCOLOR)                     
 # TYPE(DATAOUT)                   COLOR(&PCOLOR)                     
 + TYPE(TEXT)     COLOR(GREEN)                                       
 ! TYPE(TEXT)     COLOR(BLUE)                                         
 } TYPE(OUTPUT)   COLOR(TURQ) CAPS(OFF)                               
)BODY EXPAND(//)                                                     
/ /Dynamic Variable Example      / /                                 
 +Command ===>_ZCMD                                                  +
                                                                     
 +Field prompt  . ._PTEXT                                   +         
 +Description . . ._PDESC             +                               
 +Prompt color. . .@pcolor  +(red,white,green,blue,turq,yellow,pink) 
 +Prompt hilite . .@philite +(uscore,reverse,blink,'blank')           
                                                                     
 +Input color . . .@icolor  +(red,white,green,blue,turq,yellow,pink) 
 +Input hilite. . .@ihilite +(uscore,reverse,blink,'blank')           
 +Input length. . .@ilength +(numeric)                               
!                                                                     
*- Dynamic Area -----------------------------------------------------*
`DYNTEXT,DYNSHAD                                                               `
!                                                                     
*- Previous value of dynamic area input field: ----------------------*
|}OLDVAR                                                            !|
*--------------------------------------------------------------------*
)PROC                                                                 
  VER(&PCOLOR,NB,LIST,RED,BLUE,GREEN,WHITE,TURQ,YELLOW,PINK)         
  VER(&PHILITE,LIST,USCORE,REVERSE,BLINK)                             
  VER(&ICOLOR,NB,LIST,RED,BLUE,GREEN,WHITE,TURQ,YELLOW,PINK)         
  VER(&IHILITE,LIST,USCORE,REVERSE,BLINK)                             
  VER(&ILENGTH,NB,NUM)                                               
)END                                                                 


The rexx program:
Code:
/* rexx */                                                             
/* attribute characters from panel definition:                       */
/* ¬ TYPE(DATAOUT) HILITE(&a) COLOR(&b)         - input field prompt */
/* ~ TYPE(CHAR)    HILITE(&c) COLOR(&d)         - turquoise input    */
/* $ TYPE(DATAIN)  HILITE(&c) COLOR(YELLOW)     - overtype input     */
pcolor  = "green"                                                       
philite = " "                                                           
icolor  = "turq"                                                       
ihilite = "uscore"                                                     
ptext   = "Please enter your DSN"                                       
pdesc   = "(fully qualified)"                                           
dots    = ". . ."                                                       
ilength = 10                                                           
olength = ilength                                                       
oldvar  = copies(' ',olength)                                           
Address ISPEXEC                                                         
rc = 0                                                                 
Do While rc = 0                                                         
  /* fill in the dynamic area                                        */
  ptext   = strip(ptext,"T")           /* strip trailing blanks      */
  /* '¬' indicates the start of output text                          */
  /* '$' indicates the start of the input field                      */
  dyntext = "¬" ptext dots"$"          /* build prompt area          */
  plen    = Length(dyntext)            /* save Length of prompt      */
                                                                       
  dyntext =        dyntext   || left(oldvar,olength) || '¬' ||pdesc||'#'
  dynshad = copies(' ',plen) || copies('~',olength)                     
                                                                       
  "DISPLAY PANEL(DYNAMIC9)"                                             
                                                                       
  /* get the data that is in the input field                         */
  oldvar  = substr(dyntext,plen+1)     /* ingore prompt field        */
  oldvar  = substr(oldvar,1,olength)   /* save last dyn area input   */
  olength = ilength                                                     
End                                                                     
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts force tablespace using LISTDEF input DB2 1
Search our Forums:

Back to Top