MITHARG
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Difference between DEF and BASED ADDR

Go down

 Difference between DEF and BASED ADDR Empty Difference between DEF and BASED ADDR

Post  kasthuri Sun Jan 27, 2013 6:32 pm

Hi,

I'm trying to use a fiexd decimal variable in Char format as below:

Code:

DCL FD73 FIXED DEC(7,3);
DCL CH73 CHAR(4) DEF FD73;


And it gives me following error during compilation:
Code:

SEVERE AND ERROR DIAGNOSTIC MESSAGES

IEL0486I E 25 ATTRIBUTES OF 'DEFINED' ITEM 'CH73' CONFLICT WITH THOSE OF BASE. SIMPLE DEFINING ASSUMED.


But when I try the same with Based Addr function, it works fine:
Code:

DCL FD73 FIXED DEC(7,3);
DCL CH73 CHAR(4) BASED(ADDR(FD73));


Can anyone help me understand the differnece between the two scenarios described above.

kasthuri

Posts : 212
Join date : 2013-01-27

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum