Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
F11 in TABLE with more than 80 Chars.

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

Active User


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

PostPosted: Mon Nov 09, 2009 9:17 pm    Post subject: F11 in TABLE with more than 80 Chars.
Reply with quote

Hi,

I have a panel where i display a table:

Code:

)Attr Default(%+_)                                                     
/* % type(text  ) intens(high)              Defaults displayed for */   
/* + type(text  ) intens(low ) color(blue)       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( output) intens(low ) color(red)                             
)Body  Expand(//)                                                       
%-/-/- Qik Browse -/-/-                                                 
^zfle                                                                   
%Key ===> _zkey                                                         
#zhdr                                                                   
+-----------------------------------------------------------------------
)MODEL                                                                 
!zrec                                                                   
)Init                                                                   
  .Help = tutorpan                /* insert name of tutorial panel  */ 
  &amt = PAGE 
  &zw  = 80   
)Reinit       
)Proc         
)End           


but i want to be able to have more than 80 chars in zrec and be able to display on the panel with F11 and F10 functionality.

I am able to display 80 chars and able to do page up/down. But not able to do Page right/left. Tried to change &ZW to more than 80 but doesn't help.

Could you please help.
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Mon Nov 09, 2009 9:22 pm    Post subject: Reply to: F11 in TABLE with more than 80 Chars.
Reply with quote

I'm not aware of any concept of LEFT/RIGHT scrolling for tables. AFAIK you have to write your own scrolling logic, where you will call different panels to represent the LEFT and RIGHT conditions.
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: Mon Nov 09, 2009 9:28 pm    Post subject:
Reply with quote

Thanks for your reply Kevin.

I tried to capture the PF11 in my program using

Code:

do forever                                 
   "ispexec tbdispl outdata panel(QIKX)"   
   if pfkey = "PF11"                       
     then say 'pf11'                       
   lc = rc                                 
   if lc ^= 0 then leave                   
end                                       


but not able to capture F11. Could you please say what am i doing wrong.
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: Mon Nov 09, 2009 10:27 pm    Post subject:
Reply with quote

alright i got it..

icon_smile.gif

first disabled existing F10, F11 keys

Code:

zpf10    = ''                               
zpf11    = ''                               
address ispexec "VPUT (ZPF10 ZPF11) PROFILE"


and then wrote a little code around them

Code:

if PFKEY = "PF11" & tot_len <= xlen then do
  "ispexec tbend" outdata                   
  frame = frame + 1                         
  call get_data                             
end                                         
if PFKEY = "PF10" & frame > 1 then do       
  "ispexec tbend" outdata                   
  frame = frame - 1                         
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Nov 09, 2009 10:34 pm    Post subject: Reply to: F11 in TABLE with more than 80 Chars.
Reply with quote

Note: 'Z' is reserved by ISPF as a variable prefix. You should use different variable names (fixed in this example)

For your situation, the easiest thing is to define your field as a scrollable field, using the )FIELD section in the panel definition.

You have to put the cursor on the field before trying to scroll.
Code:

)Attr Default(%+_)                                                     
   % type(text  ) color(blue)            /* Defaults displayed for */ 
/* + type(text  ) intens(low ) color(blue)       information only  */ 
   _ type( input)  color(turq) caps(on ) just(left )                   
   ! type( output) color(white)                                       
   # type( output) color(blue)                                         
   ^ type( output) intens(low ) color(red)                             
   ~ type(text   ) color(green)                                       
)Body  Expand(//)  width(&zscreenw)                                   
%-/-/- Qik Browse -/-/-                                               
^qfle                                                                 
~Key ===>_qkey                                                         
#Z#qhdr / /#Z                                                         
#qscale                                                               
)MODEL                                                                 
!qrec                                                                 
)Init                                                                 
  &QREC$LEN = 180   /* length of records */                           
  .Help = tutorpan                /* insert name of tutorial panel  */
  &amt = PAGE                                                         
  &zw  = 80                                                           
 .zvars = '(QL$REC QR$REC)'                                           
)Reinit                                                               
)Proc                                                                 
)FIELD                                                                 
FIELD(QREC)  LEN(QREC$LEN)                                             
               LIND(QL$REC,'<')  RIND(QR$REC,'>') SCALE(QSCALE)       
)End                                                                   


You should notice the scale and scroll indicators ("<", ">") that are produced.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Mon Nov 09, 2009 11:20 pm    Post subject:
Reply with quote

Left / right scrolling in tables is probably the most complicated thing to program in ISPF. The 'best' (well, correct, I guess) way to do it is to have multiple panels, one for each view, your own command table that redefines LEFT and RIGHT as aliases of some application defined strings of your choice, and program logic that gets those strings from the table panel command line and then displays the correct panel based on that command.

Conceptually, it isn't too difficult, but it means creating a command table, which means running in your own application id, as well as managing all those panels. Yuck.

If you are going to go to all that trouble, you might want to use a dynamic area, though that is more complex coding, it is more flexible and has only one panel. The program does all the formatting and scrolling work.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Nov 10, 2009 1:31 am    Post subject: Reply to: F11 in TABLE with more than 80 Chars.
Reply with quote

Quote:
you might want to use a dynamic area,

I disagree. Ok, for a few fields, a dynamic area might be ok. But as a table display replacement, a dynamic area is incredibly hard to write.

To write several table panels that are related will take you a few hours. And coding your program to display different panels, might take you a hour or so.

To write program that manages a dynamic area, I think would take months to write. Even more time with input fields.
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: Tue Nov 10, 2009 4:10 pm    Post subject:
Reply with quote

hi Pedro, sorry didn't get you. does it mean that using the panel definition you have given, i need not write extra logic for F11 and F10 keys and that will be handled automatically ? I tried using the panel you gave, but to me it seems F10, F11 logic still needs to be there, am i correct ?

also - is it possible to pass the &QREC$LEN dynamically through rexx into the panel, because it can be a value which keeps changing with the type of data browsed.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Nov 10, 2009 10:19 pm    Post subject: Reply to: F11 in TABLE with more than 80 Chars.
Reply with quote

Quote:
i need not write extra logic for F11 and F10 keys and that will be handled automatically ?


It will be handled automatically.

Quote:
to me it seems F10, F11 logic still needs to be there, am i correct ?

You are incorrect. You do NOT need to write your own logic for left / right scrolling. (there is an outside chance... do you have a very old system level?. Sorry, I do not know when this was introduced)

Quote:
is it possible to pass the &QREC$LEN dynamically through rexx into the panel

I believe it is possible.

I should add that you can read about this in the ISPF Dialog Developer's Guide and Reference.
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us