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
 
comp-3 variable , when initialized , dump shows null char !!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Fri Jul 30, 2010 10:33 am    Post subject: comp-3 variable , when initialized , dump shows null char !!
Reply with quote

Hi All.

I used initialize statement on a comp-3 varaible and a numeric variable.

In the ebcdic hexx dump..

I got '00' in comp-3 and 'f0' in numeric varaible.
'00' is equivalent of NULL and 'f0' is equivalent of zero.

Can someone pls throw more light on the difference in outputs here ?
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Fri Jul 30, 2010 10:40 am    Post subject:
Reply with quote

Hello,

A comp-3 variable is a numeric variable. . .

x'00' is not the same as null. . . It is the same as low-values.

The comp-3 field is most likely not only x'00' - it is most likely x'00000C' (or whatever the length should be).

x'F0' is the value of a zoned-decimal zero.

You need to spend some time in the documentation and learn about the various numeric data used in COBOL.

There is a link to "IBM Manuals" at the top of the page - you need to read the Language Reference for your release of COBOL.
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Fri Jul 30, 2010 10:46 am    Post subject: Thank you
Reply with quote

Thanks for your time Dick.
Will go thru the manual info as suggested.. , Thanks
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Jul 30, 2010 10:49 am    Post subject: Reply to: comp-3 variable , when initialized , dump shows nu
Reply with quote

You're welcome icon_smile.gif

If you find something in the manual that is not clear, post what you found and your doubt. Someone will be able to clarify.

d
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 DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

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