IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in

Dynamic Input fields in Panel

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

New User

Joined: 26 Apr 2010
Posts: 74
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:

@DYNVAR                                                      @ 

In REXX code I want three input fields as follows :

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 :

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

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

Global Moderator

Joined: 14 Mar 2007
Posts: 8794
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

New User

Joined: 26 Apr 2010
Posts: 74
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

New User

Joined: 26 Apr 2010
Posts: 74
Location: India

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


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

Use [URL] BBCode for Links
Back to top
View user's profile Send private message

Global Moderator

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

PostPosted: Thu Nov 07, 2013 10:52 pm
Reply with 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:

 @ 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                                                            !|

The rexx program:
/* 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                                                     
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> TSO/ISPF
Page 1 of 1


Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Break a record into fields, each fiel... SYNCSORT 2
No new posts Creating a single-record file with CO... DFSORT/ICETOOL 8
No new posts AFRREBLK - Dynamic DSN IBM Tools 9
No new posts How to setup MQ panel TSO/ISPF 3
No new posts Group selective VB records - Trailer ... DFSORT/ICETOOL 16

Back to Top