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

Comp-3 Value '1234' Moved to Compx(5),What will Happen?


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

New User


Joined: 11 May 2007
Posts: 10
Location: Mumbai

PostPosted: Wed Jun 20, 2007 12:05 pm
Reply with quote

I have a comp-3 value '1234',now this value is moved to Comp varialble,what will happen?
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Wed Jun 20, 2007 12:08 pm
Reply with quote

The comp variable will still contain 1234 except in binary format.
Back to top
View user's profile Send private message
haidude

New User


Joined: 11 May 2007
Posts: 10
Location: Mumbai

PostPosted: Wed Jun 20, 2007 12:19 pm
Reply with quote

How we can see the the Comp values,it is possible thru Disply staatement?How the value 1234 is looks in Comp?
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Wed Jun 20, 2007 12:31 pm
Reply with quote

I think you have to move it to a usage is display number like pic 999
or an editting format like bbbb99999.999.

If you display it as it is you will probably get garbage.
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Wed Jun 20, 2007 2:08 pm
Reply with quote

Hi
In the vs cobol II it allows u to display comp values also
Check it out


Thanks,
Santosh
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 20, 2007 7:26 pm
Reply with quote

Hello,

Yes, you can directly display the comp field.

If you search in this forum, you will find a topic where many formats are discussed and the results when they are displayed.
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 PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts data moved using MVI on para-name. PL/I & Assembler 4
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top