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

comp-3 variable , when initialized , dump shows null char !!


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Fri Jul 30, 2010 10:40 am
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
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

Moderator Emeritus


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

PostPosted: Fri Jul 30, 2010 10:49 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Variable Output file name DFSORT/ICETOOL 8
Search our Forums:

Back to Top