35 pts.
 Multiple display file in CL program
CL
I need to have one screen where a user can enter some information, lets say customer number then when they press enter that information will be shown in text on the second screen. So lets say the user enters 321 for customer number and then the second screen needs say "The customer number processed was 321" I can't get the 321 to display on the second screen, I guess, because I have to use the opnid to use it. Any suggestions rather than using an rpg? thanks, Mike

Software/Hardware used:
ASKED: August 20, 2012  3:31 PM

Answer Wiki:
Is it the same field name on each screen? Do you have two different display files or just one with multiple formats?
Last Wiki Answer Submitted:  August 21, 2012  12:58 pm  by  CharlieBrowne   32,905 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,905 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Currently I have two different display files, but could easily change it two one object with two formats.  The field name is the same on both screens, but again I can change this and then use chgvar to set the value if needed.

 35 pts.

 

As Charlie Brown suggested, use two formats in a single display file.
Record formats can be used in the SNDRCVF or SNDF commands..

 44,190 pts.

 

But are you going to check that the input is valid?  At some point this process becomes rather beyond the scope of a typical Cl program. 

 44,190 pts.

 

I can’t get the 321 to display on the second screen
 
Why not? What happens? It’s difficult to suggest changes if we don’t know what’s going on.
the second screen needs say “The customer number processed was 321″
 
What does it say instead? Is the first value entered as a numeric or character variable?
 
The field name is the same on both screens..
 
The first value is onlt three digits while the second is a multi-word sentence. While it’s technically possible to have it work that way, why would you want two variables with very different characteristics and uses to have the same name?
 
Tom

 108,165 pts.