Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Redefine display clause by comp-3

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Redefine display clause by comp-3
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    Post subject:
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    Post subject: Re: Redefine display clause by comp-3
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    Post subject: Re: Redefine display clause by comp-3
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    Post subject: Re: Redefine display clause by comp-3
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    Post subject: thanx
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us