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

Re: Internal sign encoding in DISPLAY and PACKED-DECIMAL usage
William,

Thank you for your answer and congratulation for your Faq: it is very
documented and interesting.

William M. Klein wrote:

>    You have mixed "apples and oranges" - although you may well be correct 
that
> there is an error in the documentation.
>
> What the Enterprise COBOL LRM states *is* true for the Enterprise COBOL
> compiler.
>
> It is *NOT* (always) true for IBM's COBOL for Windows.  The sign-nibble on
 the
> PC (with the IBM compiler - and several others) is the same between
> Packed-Decimal and Zoned Decimal when the compiler is in "EBCDIC" mode but
 IS
> not the same when in ASCII mode.

OK, I understand that. It is like in ASCII mode the DISPLAY sign
representation should be compatible with ASCII 7 bits (therefore lower
than 7F), while the PACKED sign representation need not to be
"printable" (ie it can be the same Ci, Di or Fi than in EBCDIC), isn't it ?

> Some compilers (for example Micro Focus) has an option for working in ASCI
I
> mode - but using EBCDIC sign-nibbles (or vice versa - I can't remember off
 the
> top of my head).  However, this is NOT true for the IBM Windows compiler.
>
> I don't see a separate web page for the "IBM Websphere Studio COBOL for Wi
ndows
> V5.11" manuals, but the VisualAge COBOL (predecessor product) is at:
>    http://www-306.ibm.com/software/awd...bol/va/library/

In fact, there is here:

http://www-306.ibm.com/software/awdtools/cobol/library/

You can find on this page two links regarding "COBOL for Windows", one
for Language Reference and the other for Programming Guide.

> and that seems to indicate that it uses the same LRM as the "mainframe"  (
older
> version IBM COBOL for OS/390 & VM) LRM.  If that is still the case with th
e
> current Windows compiler, then what you have found is a "bug".

Indeed there is now a separate LRM for Windows but it says exactly the
same thing regarding 4-bit sign representation (p.213). IMHO, this is at
least confusing...

I have another question about the sign position. I was thinking that the
default was TRAILING, but the IBM Websphere Studio COBOL PGM for Windows
V5.11 shows (p. 37 again) the following example:

For "PIC S9999 DISPLAY", the value -1234 is encoded like this (NATIVE):
71 32 33 34

For "PIC S9999 DISPLAY", the value -1234 is encoded like this (EBCDIC):
F1 F2 F3 D4

Therefore, in the first case, the sign seems to be held by the first
byte (71)... but I found no mention of this particularity. Do you have
an idea about that ?

Best Regards,

--
Vincent Danion.

Report this thread to moderator Post Follow-up to this message
Old Post
Vincent Danion
11-17-04 01:55 PM


Re: Internal sign encoding in DISPLAY and PACKED-DECIMAL usage
The LRM seems to contradict the examples in the PG.  I have sent a query to 
one
of my "usually reliable sources" in IBM.

My *guess* is that it is the LRM that is wrong and that for some reason
WebSphere COBOL for Windows defaults to "leading" rather than trailing signs
.
If this is true, it would cause a medium serious "migration inhibitor" for
people trying to migrate existing IBM mainframe COBOL applications to that
environment  (as redefines that assume trailing are fairly common).

However, as I don't have the product myself, I'll wait to see what response 
(if
any) I receive.

--
Bill Klein
wmklein <at> ix.netcom.com
"Vincent Danion" <vdaNOniSPAMon@scort.com> wrote in message
news:300l0vF2q72joU1@uni-berlin.de...
> William,
>
> Thank you for your answer and congratulation for your Faq: it is very
> documented and interesting.
>
> William M. Klein wrote:
> 
>
> OK, I understand that. It is like in ASCII mode the DISPLAY sign
> representation should be compatible with ASCII 7 bits (therefore lower tha
n
> 7F), while the PACKED sign representation need not to be "printable" (ie i
t
> can be the same Ci, Di or Fi than in EBCDIC), isn't it ?
> 
>
> In fact, there is here:
>
> http://www-306.ibm.com/software/awdtools/cobol/library/
>
> You can find on this page two links regarding "COBOL for Windows", one for
> Language Reference and the other for Programming Guide.
> 
>
> Indeed there is now a separate LRM for Windows but it says exactly the sam
e
> thing regarding 4-bit sign representation (p.213). IMHO, this is at least
> confusing...
>
> I have another question about the sign position. I was thinking that the
> default was TRAILING, but the IBM Websphere Studio COBOL PGM for Windows V
5.11
> shows (p. 37 again) the following example:
>
> For "PIC S9999 DISPLAY", the value -1234 is encoded like this (NATIVE):
> 71 32 33 34
>
> For "PIC S9999 DISPLAY", the value -1234 is encoded like this (EBCDIC):
> F1 F2 F3 D4
>
> Therefore, in the first case, the sign seems to be held by the first byte
> (71)... but I found no mention of this particularity. Do you have an idea
> about that ?
>
> Best Regards,
>
> --
> Vincent Danion.



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
11-18-04 08:55 AM


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 06:01 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.