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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


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