Page 1 of 1

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

PostPosted: Thu Jan 31, 2013 11:50 am
by Mann_B
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.

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

PostPosted: Thu Jan 31, 2013 9:56 pm
by Pedro
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.

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

PostPosted: Tue Feb 05, 2013 10:37 am
by Mann_B
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..

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

PostPosted: Tue Feb 05, 2013 2:06 pm
by enrico-sorichetti
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

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

PostPosted: Tue Feb 05, 2013 2:36 pm
by Mann_B
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.

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

PostPosted: Tue Feb 05, 2013 7:49 pm
by Pedro
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.