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

IMS DC - significance of ATTR=NUM in 3270


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saidharrao
Warnings : 1

New User


Joined: 19 Feb 2005
Posts: 27
Location: hyderabad-ap-india

PostPosted: Thu Dec 13, 2007 12:18 am
Reply with quote

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,
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Dec 13, 2007 7:04 pm
Reply with quote

You should continue to use ATTR=NUM. You should also always check for numerics in your logic. How are you initializing your screen?
Back to top
View user's profile Send private message
saidharrao
Warnings : 1

New User


Joined: 19 Feb 2005
Posts: 27
Location: hyderabad-ap-india

PostPosted: Wed Dec 19, 2007 5:05 pm
Reply with quote

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.
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts Ring the Bell on a 3270 terminal PL/I & Assembler 5
No new posts Not seeing the error panel )ATTR TSO/ISPF 4
No new posts REXX and 3270 highlighting CLIST & REXX 5
No new posts coloured / formatted screen captures ... IBM Tools 12
Search our Forums:

Back to Top