Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us