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

Double word reference needed.


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
k_rajesh

New User


Joined: 14 May 2010
Posts: 14
Location: hyd

PostPosted: Thu Jan 06, 2011 7:45 pm
Reply with quote

Hi,

I am new to ASM. I was dumping Double word.

DWRD DC D'10' -- I see it as 41A0000000000000

DWRD DC D'17' -- I see it as 4211000000000000

I see that THE SECOND BIT INDICATES THE NUMBER OF BITS USED FOR THE DOUBLE WORD.

I do not understand the significance of 4 at the starting. Never used Double word that frequently. So any references to manuals will be very helpful.

Thanks,
Munni.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jan 06, 2011 8:01 pm
Reply with quote

This appears to be floating point data -- which you didn't specify in your post. Terminology is critical in IT, where similar terms may mean very different things. "Double word" means that 8 bytes are used -- those 8 bytes could be character data (EBCDIC, ASCII, or some code page), packed decimal, floating point, zoned decimal or even binary. Specifying "double word" without specifying the precise format can waste everybody's time if we're assuming one format is being used and that's not the format you are referencing. For example, hex '97994D' is a three-character hex field. If it is considered a packed decimal number, the value is -97994. If it is considered an EBCDIC character string, the value is pr(. Which is it? That depends upon what the application is looking for.

Assuming you are talking about floating point numbers, the format is:
first bit -- sign (0 postiive, 1 negative)
next 7 bits -- exponent (in excess-64 notation), so 40 (hex 64) means the value is times 10 to the zero power.
next 56 bites -- mantissa with implied decimal point before the first digit.
Hence 4211000000000000 is equivalent to hex 11, or decimal 17
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Jan 06, 2011 8:12 pm
Reply with quote

On the flip side, if you define it as an FD'10' as opposed to a D'10', then the value will be X'000000000000000A', which is decimal 10.

You can also define it straight away as X'000000000000000A', but then you may have an alignment issue.

Bill
Back to top
View user's profile Send private message
k_rajesh

New User


Joined: 14 May 2010
Posts: 14
Location: hyd

PostPosted: Fri Jan 07, 2011 1:42 pm
Reply with quote

Hi Frens,

Thanks for the clarification. As I told you I was just dumping each data type and was curious to see the values. I saw these values in the compiler listing. Lo now I see that if I give a D'17' then it will be represented in floating point form. This is good learning.

Thanks for the clarification frens. I will keep in mind the terminology whenever I query from now on.

Thanks,

Munni.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Help in extracting data between doubl... DFSORT/ICETOOL 5
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
Search our Forums:

Back to Top