Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

POINTER alignment
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



Report this thread to moderator Post Follow-up to this message
Old Post
Roger While
02-17-07 08:55 AM


Re: POINTER alignment
Hi 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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Richard Maher
02-17-07 12:55 PM


Re: POINTER alignment
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Karl Kiesel
02-19-07 08:55 AM


Re: POINTER alignment
On 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





Report this thread to moderator Post Follow-up to this message
Old Post
Frank Swarbrick
02-20-07 11:55 PM


Re: POINTER alignment
On 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Binyamin Dissen
02-21-07 12:55 PM


Re: POINTER alignment
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Karl Kiesel
02-21-07 12:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:02 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.