saidharrao Warnings : 1 New User
Joined: 19 Feb 2005 Posts: 27 Location: hyderabad-ap-india
|
|
|
|
Hi all,
I am back with yet another query. I am confused with the functionality of ATTR=NUM parameter.
1. What is the use of ATTR=NUM parameter? I have read somewhere that when this parameter is used, autoshifting (justifcation) will be done. But at the same place I read it is applicable for only 3275/6/7/8 devices. I am working on 3270 device. then what is the significance here?
2. My requirement is: I will display 100 keys on a screen. Before displaying I would save all the 100 in SPA. Once the user selects the record number, I would fetch the corresponding record from SPA based on the selection number and get the data for display.
My problem is: I have defined the type of the selection number as 9(3) in both MID and MOD copybooks. Hence as a default value 000 will be displayed to the user. Hence if he wants to select the 1st record, he has type in '001' instead of just 1 which they are not happy with that. If I change the type X(03), I cant use it as a subscript to fetch it from SPA hence get the compilation errors. What should I do?
If the user types in '1 ', I should take it as 001 in the program, if he types in '10 ', I should take it as '010'. How to do that?
At the moment my defintions for that field are:
MFS : ATTR=ALPHA
Copybooks: MID : 9(3)
MOD: 9(3)
Can we use any JUST, FILL, NUM parameters somehow to overcome this problem? If it is how? I tried but not succeeded.
To say in simple words:
1. While displaying the field, display as spaces.
2. While receiving, receive as numeric (right justified) value.
Please note that we are too far with the development, hence it would be great if the resolution is on Copybooks and MFS only rather than the program.
It would be great and thankful if anybody can help me on this.
Thanks, |
|
saidharrao Warnings : 1 New User
Joined: 19 Feb 2005 Posts: 27 Location: hyderabad-ap-india
|
|
|
|
Hi,
I have found the solution for this.
1. Remove the field from MOD area.
2. Add DSCA=X'00A0' to you DEV operand
3. Add JUST=R,FILL=C'0' to you MID field
DSCA clears the device buffer before displaying the screen. |
|