Dynamically know if the field in i/p or o/p in REXX



IBM's Command List programming language & Restructured Extended Executor

Dynamically know if the field in i/p or o/p in REXX

Postby Mann_B » Thu Jan 31, 2013 11:50 am

Hi All

I have a requirement where I need to know if the field defined in ISPF panle is input or output.

I have 2 fields A and B ..If user enters value in A then I need to do some conversion accordingly and display the value for B
and if the user enters value in B ,I need to do some conversion accordingly and display the value for A.

I will get to know which field he has entered only in REXX pgm,so I need to decide which is o/p based on that and update the o/p value.
Can you pls let me know how can we achieve this.I have searched but could not exaclty get how to do this.
I tried like below ,I got it from one of posts but getting an error.
B = B||(* INP) . Where * is defined as OUTPUT in ISPF Panel and INP is some calculated value.
Mann_B
 
Posts: 79
Joined: Wed Mar 31, 2010 11:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: Dynamically know if the field in i/p or o/p in REXX

 

Re: Dynamically know if the field in i/p or o/p in REXX

Postby Pedro » Thu Jan 31, 2013 9:56 pm

You posed your initial question as a field definition question, but describe it as a field usage question.

If the user can type in field A sometimes and in field B at other times, then both fields have to be input fields.

How about this:
1. Save the existing value of A and B to an other set of variables, the 'old set'
2. Display the panel. The user can change values then press Enter.
3. Compare new value of A with old value of A.
4. Compare new value of B with old value of B.
5. Process according to comparison. Set new value of A or B.
6. Save the new value of A and B to an other set of variables, the 'old set'
7. Display the panel again with new values.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: Dynamically know if the field in i/p or o/p in REXX

Postby Mann_B » Tue Feb 05, 2013 10:37 am

Hi Pedro
Thank for the reply

I cannot set any initial values to those fields.They should be blank.And I tried to define both fields as inputs.But whatever value I am chaging thru REXX program ,it is not reflecting in the panel.I guess they should be defined as output to reflect the calculated values.But if I define as o/p,I am unable to enter any values for those fields.
Can you please help me out in solving this..
Mann_B
 
Posts: 79
Joined: Wed Mar 31, 2010 11:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: Dynamically know if the field in i/p or o/p in REXX

Postby enrico-sorichetti » Tue Feb 05, 2013 2:06 pm

You did not give enough details,
a possibility could be to find out the cursor position and use as <input> the field where the cursor is positioned
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Dynamically know if the field in i/p or o/p in REXX

Postby Mann_B » Tue Feb 05, 2013 2:36 pm

HI Enrico-
Thanks for ur reply.
a possibility could be to find out the cursor position and use as <input> the field where the cursor is positioned
.. I did not understand this.Please let me know what more details I can provide you.
Mann_B
 
Posts: 79
Joined: Wed Mar 31, 2010 11:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: Dynamically know if the field in i/p or o/p in REXX

Postby Pedro » Tue Feb 05, 2013 7:49 pm

I cannot set any initial values to those fields.They should be blank.And I tried to define both fields as inputs.

Blank is a valid initial value. If you want to be able to type into it, it has to be an input field.

But whatever value I am chaging thru REXX program ,it is not reflecting in the panel.

There is a problem with line 17 of your rexx program.**

I guess they should be defined as output to reflect the calculated values

Output fields can only display information. But input fields can have initial values (output) and allow the user to type into.

** Show us your rexx and your panel. We are not mind readers.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post