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

how to pass width of a panel dynamically..


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

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 2:24 pm
Reply with quote

hi, i want to have a panel similar to ISRBRO* where I can give width of the panel dynamically.

because i am browsing records of variable lengths in this panel.

my panel is something like this:

Code:

 )Attr Default(%+_)                                                     
 /* % type(text  ) intens(high)              Defaults displayed for */ 
 /* + type(text  ) intens(low )                   information only  */ 
 /* _ type( input) intens(high) caps(on ) just(left )               */ 
    ! type( output) intens(high) caps(on ) just(left ) pad(' ')         
    # type( output) intens(low) caps(on ) just(left ) pad('*')         
    ^ type( input) intens(low ) caps(off) just(asis ) pad('_')         
 )Body  Expand(//) Width(&Zw)                                           


and i am passing the value of ZW from my rexx..

Code:

 zhdr = zfld                                           
 zw = length(zhdr)                                     
       tbkey = '(zrec)'                                 
       "ispexec tbcreate outdata keys "tbkey" nowrite" 
       do i = 2 to 1000                                 
          zrec = strip(zout.i,'T',' ')                 
          "ispexec tbadd outdata"                       
          "ispexec tbbottom" outdata                   
       end                                             
       "ispexec tbtop" outdata                         
       do forever                                       
          "ispexec tbdispl outdata panel(QIK2)"         
          lc = rc                                       
          if lc ^= 0 then leave                         
       end                                             
       "ispexec tbend" outdata                         
       zrec = ''                                       
 return                                                 


but getting this error.. icon_sad.gif

Code:

 ISPV021                                             
                                                     
 Invalid GET request                                 
 Variable name '' is not a valid REXX variable name. 
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
 Current dialog statement:                           
 tbdispl outdata panel(QIK2)                         


can you please suggest what's wrong.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Sep 25, 2008 4:02 pm
Reply with quote

You can use &ZSCREENW directly with WIDTH.

O.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 4:35 pm
Reply with quote

ofer71 wrote:
You can use &ZSCREENW directly with WIDTH.


does that mean i need to use &ZSCREENW instead of &ZW and pass value to ZSCREENW from the program ? i tried that, but same result!
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 4:38 pm
Reply with quote

if i remove '&' from &ZSCREENW i get following error.. icon_sad.gif

Code:

ISPP289                                                             
                                                                     
Panel 'QIK2' error                                                   
Invalid WIDTH value, (must be numeric chars, >= 80, <= screen width).
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
Panel line where error was detected:                                 
)Body  Expand(//) Width(ZSCREENW)                                   
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Sep 25, 2008 5:20 pm
Reply with quote

Have you tried to display the value of ZSCREENW and see the value in it?

O.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 5:28 pm
Reply with quote

ofer71 wrote:
Have you tried to display the value of ZSCREENW and see the value in it?


yes, the value is 86.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Sep 25, 2008 5:31 pm
Reply with quote

Then, there should be no problen using it in WIDTH. Try to use panel trace utility to find the error.

O.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 5:47 pm
Reply with quote

hi O,

i ran ISPDPTRC and now i have a user.ISPPNL.TRACE

which part of trace can give me idea about the error. to me it seems similar to what i already saw in the ISPP289 error.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Sep 25, 2008 5:51 pm
Reply with quote

See how ISPF processes the BODY section and how the variables values are interpreted.

O.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 7:06 pm
Reply with quote

nothing helped sorry.

i will put my problem. i am using a tbdispl to display the records on my panel. now those records span more than 80 columns and hence i need a way to scroll right and left.

is it possible to scroll right/left a tbdispl sort of panel?
if yes, then how?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Sep 25, 2008 7:13 pm
Reply with quote

genesis786 wrote:
is it possible to scroll right/left a tbdispl sort of panel?


No, not that I know of. I believe you have to write your own logic and use a different panel for each scroll operation.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Sep 25, 2008 9:39 pm
Reply with quote

I think this is key:
Quote:
(must be numeric chars, >= 80, <= screen width)

What is the actual screen size?

I do not think ZSCREENW can be updated.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 10:15 pm
Reply with quote

hi Pedro,

the screen width needs to be dynamic. something similar to ISRBROA where we usually browse all the files.

but i think, i am approaching the problem wrong way! icon_sad.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Sep 26, 2008 4:37 am
Reply with quote

I think you are confusing the screen (terminal dimensions) with your data. The widest screen you can have is the dimension of the terminal.

I am not sure what you think you are seeing, but ISRBROA panel will only show 80 characters (for example) at a time. The program driving the panel determines what data is in the body of the panel.

With a table, your logic would be something like this:

Code:

mypanel = 'PANEL1'

Do while...
    "TBDISPL PANEL("mypanel")"
    If zcmd = 'RIGHT' then
       mypanel = "PANEL2"
    If zcmd = 'LEFT" Then
       mypane = "PANEL1"
...
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Call program, directly from panel CLIST & REXX 9
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
Search our Forums:

Back to Top