Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Dynamic Input fields in Panel

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Appu

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Thu Nov 07, 2013 12:30 pm    Post subject: Dynamic Input fields in Panel
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: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 07, 2013 1:04 pm    Post subject:
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: 74
Location: India

PostPosted: Thu Nov 07, 2013 1:42 pm    Post subject:
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: 74
Location: India

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

Hi,

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

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

Senior Member


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

PostPosted: Thu Nov 07, 2013 10:52 pm    Post subject: Reply to: Dynamic Input fields in Panel
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us