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

Redefine display clause by comp-3


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Hemant B.

New User


Joined: 05 Oct 2006
Posts: 8

PostPosted: Thu Oct 05, 2006 2:40 pm
Reply with quote

i have a data variable having pic clause s9(7)v9(2).
can i redefine above data type by another one mentioning
s9(9) comp-3.
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Thu Oct 05, 2006 3:24 pm
Reply with quote

Hi Hemant,

Yes you can redefine display items with comp-3.
But, I am afraid, when you use the values in your programmer, it will not give you expected results.

Always remember, redefines clause just makes the variable to start from the same locations in the memory nothing else! It doesn't make sure that the data type conversion happens automatically.

Happy redefining!!!
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Oct 05, 2006 3:32 pm
Reply with quote

Hi,

Redefines will not give any problem. But Redefined field will not hold actual data.
Back to top
View user's profile Send private message
GIRIRAJ

New User


Joined: 26 Sep 2006
Posts: 1
Location: PUNE

PostPosted: Thu Oct 05, 2006 5:51 pm
Reply with quote

yes u redefine
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Oct 05, 2006 6:09 pm
Reply with quote

Hi,

For example s9(7)v9(2) field contain 3333333.33
If it is redefined with s9(9) comp-3 then this field will contain 3 3 3 3.
I am not sure why it is giving the above value.
But when I tested this I got the above value.
Back to top
View user's profile Send private message
Hemant B.

New User


Joined: 05 Oct 2006
Posts: 8

PostPosted: Fri Oct 06, 2006 3:57 pm
Reply with quote

thanx
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts To search DB2 table based on Conditio... DB2 1
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts How to display the leading zeros of a... DB2 7
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top