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

How to change an output field to an input field in panel


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

New User


Joined: 22 Nov 2007
Posts: 64
Location: Germany

PostPosted: Wed May 06, 2015 10:46 pm
Reply with quote

Hi folks,

I like to change an output field to an input field in an ISPF panel.
But it doesn't work. Example see below...

What is wrong in the panel definition ?

Code:
000001 )ATTR                                                                   
000002   $ TYPE(INPUT)  INTENS(LOW) CAPS(OFF)  JUST(LEFT) PAD('_') COLOR(RED) 
000003   # TYPE(OUTPUT) INTENS(LOW) CAPS(OFF)  JUST(LEFT) COLOR(BLUE)         
000004 )BODY                                                                   
000005 +                                                                       
000006 %Command ===> _ZCMD                                  %Scroll ===>_AMT +
000007 +                                                                       
000008 +                                                                       
000009 +Type               : $PTYP        +                                   
000010 #Z1                   #VAL1                          +                 
000011 +                                                                       
000012 )INIT                                                                   
000013   VGET (amt) PROFILE                                                   
000014   IF (&amt = &Z)                                                       
000015       &amt = CSR                                                       
000016 )REINIT                                                                 
000017 )PROC                                                                   
000018   IF (&PTYP = 'Person')                                                 
000019      &Z1 = 'First Name         :'                                       
000020      .ATTR(VAL1) = 'TYPE(INPUT)'                                       
000021                                                                         
000022   VPUT (amt) PROFILE                                                   
000023 )HELP                                                                   
000024 )END                                                                   


Thank in advance for help
icon_smile.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed May 06, 2015 10:56 pm
Reply with quote

Your code needs to be in the )INIT section. This section is processed before the Panel is displayed.

The )PROC section where you have the code is not processed until the enter key is pressed.

Additionally if you want the underscoring and color change, you have to specify in your code as well.

Finally, you are going to have to return to your calling panel and Display it again as well.

The way you have it coded where you do not want the second field as input based on the value of the first leaves you in a bad way.
Back to top
View user's profile Send private message
oerdgie

New User


Joined: 22 Nov 2007
Posts: 64
Location: Germany

PostPosted: Wed May 06, 2015 11:37 pm
Reply with quote

Thanks for the answer...

What I aim to do is, enter a string in PTYP. Press Enter.
If PTYP is 'Person' then change VAL1 from output to input field.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed May 06, 2015 11:52 pm
Reply with quote

You will have to Display your panel a second time.

Either a second display or loop back around.
Back to top
View user's profile Send private message
oerdgie

New User


Joined: 22 Nov 2007
Posts: 64
Location: Germany

PostPosted: Thu May 07, 2015 11:54 am
Reply with quote

Yes I like to display the panel a second time as a second display.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu May 07, 2015 5:35 pm
Reply with quote

Sounds like you have a plan:

1) Move this code to )INIT section
Code:
000018   IF (&PTYP = 'Person')                                                 
000019      &Z1 = 'First Name         :'                                       
000020      .ATTR(VAL1) = 'TYPE(INPUT)' 


2) Add code to calling Rexx program after the first Display Panel
IF PTYP = 'Person' then Display Panel

This should get you on the right path.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top