Code Comments
Programming Forum and web based access to our favorite programming groups.Yes, I know POINTER alignment is implementor defined however I would like to know what various Cobol compilers do. eg. 01 MYREC. 03 FILLER PIC X. 03 MYPTR USAGE POINTER. MF (per default) does not align so that MYREC is 5/9 bytes depending 32/64 bit. What do the big-iron boxes do ? Roger
Post Follow-up to this messageHi Roger, DEC COBOL will do the same (by default). Compiler qualifiers (and even *DC SET ALIGNMENT compiler directives) can control the behaviour for performance. By all reports, an alignment fault on Itanium is extremely expensive so COBOL goes out of its way to generate the code to stop this from happening. There is at least one that got through the net (something to do with INDEXED BY) that is actively being bugfixed now. Regards Richard Maher "Roger While" <simrw@sim-basis.de> wrote in message news:er6cnn$pao$00$1@news.t-online.com... > Yes, I know POINTER alignment is implementor defined however > I would like to know what various Cobol compilers do. > eg. > 01 MYREC. > 03 FILLER PIC X. > 03 MYPTR USAGE POINTER. > > MF (per default) does not align so that MYREC is > 5/9 bytes depending 32/64 bit. > What do the big-iron boxes do ? > > Roger > >
Post Follow-up to this message"Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag news:er6cnn$pao$00$1@news.t-online.com... > Yes, I know POINTER alignment is implementor defined however > I would like to know what various Cobol compilers do. > eg. > 01 MYREC. > 03 FILLER PIC X. > 03 MYPTR USAGE POINTER. > > MF (per default) does not align so that MYREC is > 5/9 bytes depending 32/64 bit. > What do the big-iron boxes do ? > > Roger Roger, Our Compiler COBOL2000 aligns pointers to full words (390 architecture); thus the structure MYREC will be 8 bytes long (because 01 levels are always aligned to double word); more on alignment details of other USAGEs can be found in our language manual using the index 'SYNCHRONIZED' and/or 'slack bytes' Karl Kiesel Fujitsu Siemens Computers, München
Post Follow-up to this messageOn COBOL for VSE/ESA MYREC is 5 bytes (1 + 4). Yes, I know POINTER alignment is implementor defined however I would like to know what various Cobol compilers do. eg. 01 MYREC. 03 FILLER PIC X. 03 MYPTR USAGE POINTER. MF (per default) does not align so that MYREC is 5/9 bytes depending 32/64 bit. What do the big-iron boxes do ? Roger
Post Follow-up to this messageOn Mon, 19 Feb 2007 08:30:36 +0100 "Karl Kiesel" <Karl.Kiesel@fujitsu-siemens.com> wrote: :>"Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag :>news:er6cnn$pao$00$1@news.t-online.com... :>> Yes, I know POINTER alignment is implementor defined however :>> I would like to know what various Cobol compilers do. :>> eg. :>> 01 MYREC. :>> 03 FILLER PIC X. :>> 03 MYPTR USAGE POINTER. :>> MF (per default) does not align so that MYREC is :>> 5/9 bytes depending 32/64 bit. :>> What do the big-iron boxes do ? :>Our Compiler COBOL2000 aligns pointers to full words (390 architecture); Even if SYNC is NOT specified? :>thus the structure MYREC will be 8 bytes long (because 01 levels are alway s :>aligned to double word); more on alignment details of other USAGEs can be :>found in our language manual using the index 'SYNCHRONIZED' and/or 'slack :>bytes' -- Binyamin Dissen <bdissen@dissensoftware.com> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies.
Post Follow-up to this message"Binyamin Dissen" <postingid@dissensoftware.com> schrieb im Newsbeitrag > :>Our Compiler COBOL2000 aligns pointers to full words (390 architecture); > > Even if SYNC is NOT specified? > Yes! Specification of SYNC is not necessary, and the compiler even disallows it in connection with USAGE POINTER (the same applies to PROGRAM-POINTER and OBJECT REFERENCE) Karl Kiesel Fujitsu Siemens Computers
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.