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
 

 

Refresh Content on Model line variable

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

New User


Joined: 08 Oct 2008
Posts: 5
Location: washington state

PostPosted: Thu Oct 09, 2008 7:29 pm    Post subject: Refresh Content on Model line variable
Reply with quote

I have a panel that displays using a variable in the )MODEL statement. The value of the variable can change. I want to dynamically refresh the screen when requested by the user. This works sort of, it has to be executed twice for it to work. Here is a sample of my code. In my REXX program I set the variable &SHOWDT to "Y" or to "N", then I look at that to build the model line.

Code:

)MODEL CLEAR(PGMOPT STATUS) ROWS(&MODTYPE)                             
&TBLLINE                                                               
)INIT                                                                 
 .HELP = PMSH01                                                       
 &ZHTOP=PMSH01                                                         
                                                                       
 .ZVARS =                                                             
  '(ZSCBR PGMOPT PGMNAME, +                                           
    REL VER CSR SUBGRP USER LDATE LOC, +                               
    STATUS LOCK MIGRATE)'                                             
                                                                       
 &LINEBASE = '@Z !Z       !Z   !Z !Z     !Z  $Z   $Z     $Z$Z      $Z'
 &LINEDTS = '$MODDT $MIGPOS$MIGCVC¬$Z¬'                               
 &LINECMT = '!COMMENTS             $Z¬'                               
                                                                       
 VGET (SHOWDT) PROFILE                                                 
 IF (&SHOWDT = 'Y')                                                   
   &TBLLINE = '&LINEBASE.&LINEDTS'                                     
 ELSE                                                                 
   &TBLLINE = '&LINEBASE.&LINECMT'                                     
 VPUT (SHOWDT TBLLINE) PROFILE                                         
                                       
)REINIT                                 
 VGET (SHOWDT) PROFILE                 
 IF (&SHOWDT = 'Y')                     
   &TBLLINE = '&LINEBASE.&LINEDTS'     
 ELSE                                   
   &TBLLINE = '&LINEBASE.&LINECMT'     
 VPUT (SHOWDT TBLLINE) PROFILE         
 REFRESH(TBLLINE)                       
)PROC                                   
 VGET (SHOWDT TBLLINE) PROFILE         
)END                                   


Any idea of why it has to be executed twice for it to work?
Back to top
View user's profile Send private message

Pedro

Senior Member


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

PostPosted: Thu Oct 09, 2008 9:36 pm    Post subject: Reply to: Refresh Content on Model line variable
Reply with quote

Because of the way you use TBLLINE variable, I get the impression that you are not displaying a table!

I think panels with )MODEL sections are meant to be used with TBDISPL service (and in your program, also use TBCREATE, TBADD, etc...). I suspect without using table services, you get unpredictable results.
Back to top
View user's profile Send private message
russnesbitt

New User


Joined: 08 Oct 2008
Posts: 5
Location: washington state

PostPosted: Thu Oct 09, 2008 10:03 pm    Post subject: Reply to: Refresh Content on Model line variable
Reply with quote

No, I am using a table. The reason I am doing it this way is to simulate page right and left. When the customer wants to show different fields I change the value of "tblline". I was doing this in my REXX code and it was working fine, but I had to add some fields and it became kindof a pain to change all the places in the REXX code. So I am trying to do it all in the panel.

I think it should work. For testing I am showing the value of tblline on the panel and it gets changed correctly, but the table data does not change until the second time I redisplay the panel.

Here it is showing correctly (when I first come in)
Code:

-------------------------------  SHOWING COMMENT ------------------------------
COMMAND ==>                                                 Row 1 to 35 of 396
  @Z !Z       !Z   !Z !Z     !Z  $Z   $Z     $Z$Z      $Z!COMMENTS             $
                                    CHECKED          L                         
   PGM NAME  REL VR  CSR   GRP USER   OUT  L STATUS  K COMMENTS              M
-- -------- ---- -- ------ --- ---- ------ - ------- - --------------------- -
__ ALI0415A 45X_ 00 R1218_ AUD 1218 200409 T _______ _ AUDIT________________ B
__ ALI200XA 60X_ 00 R5359_ ST9 5359 200703 T _______ _ SORT TAX DET PAYMENTS B
__ ALI200XD 60X_ 00 R5359_ ST9 5359 200703 T _______ _ NPI PHASE 3__________ B


Here is what it looks like after I try to change the display. If you look just below the command line you will see the value of tblline. It is correct. My titles changed but not the table data ...
Code:

-------------------------------  SHOWING DATES   -----------------------------
COMMAND ==>                                                 Row 1 to 35 of 396
 @Z !Z       !Z   !Z !Z     !Z  $Z   $Z     $Z$Z      $Z$MODDT $MIGPOS$MIGCVC¬
                                    CHECKED          L  LAST    MIG    MIG   
   PGM NAME  REL VR  CSR   GRP USER   OUT  L STATUS  K MOD DT TO POS TO CVC  M
-- -------- ---- -- ------ --- ---- ------ - ------- - --------------------- -
__ ALI0415A 45X_ 00 R1218_ AUD 1218 200409 T _______ _ AUDIT________________ B
__ ALI200XA 60X_ 00 R5359_ ST9 5359 200703 T _______ _ SORT TAX DET PAYMENTS B
__ ALI200XD 60X_ 00 R5359_ ST9 5359 200703 T _______ _ NPI PHASE 3__________ B



And now here it is, displayed correctly after the second time ...
Code:

-------------------------------  SHOWING DATES   ------------------------------
COMMAND ==>                                                 Row 1 to 35 of 396
  @Z !Z       !Z   !Z !Z     !Z  $Z   $Z     $Z$Z      $Z$MODDT $MIGPOS$MIGCVC¬$
                                    CHECKED          L  LAST    MIG    MIG     
   PGM NAME  REL VR  CSR   GRP USER   OUT  L STATUS  K MOD DT TO POS TO CVC  M
-- -------- ---- -- ------ --- ---- ------ - ------- - --------------------- -
__ ALI0415A 45X_ 00 R1218_ AUD 1218 200409 T _______ _ 200409 ______ ______  B
__ ALI200XA 60X_ 00 R5359_ ST9 5359 200703 T _______ _ 200703 ______ ______  B
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Oct 09, 2008 11:15 pm    Post subject: Reply to: Refresh Content on Model line variable
Reply with quote

You have some assignment statements in the )INIT section. Try putting the same assignment statements in the )REINIT section.

FYI. I think it is easier to have two separate panels and display the desired one as needed.
Back to top
View user's profile Send private message
russnesbitt

New User


Joined: 08 Oct 2008
Posts: 5
Location: washington state

PostPosted: Fri Oct 10, 2008 2:51 am    Post subject: Reply to: Refresh Content on Model line variable
Reply with quote

Yes, I had already tried moving the assignment statments to the reinit section. I guess I will take a look at what it will take to create two seperate panels.

Thanks for your time.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Oct 10, 2008 5:04 am    Post subject: Reply to: Refresh Content on Model line variable
Reply with quote

Quote:
already tried moving

I meant to have in both places.

Quote:
what it will take to create two seperate panels

Just copy the original, then edit both and remove the stuff that does not belong in that panel. Your application needs to display one panel or the other based on if LEFT or RIGHT was pressed.
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am


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