Home > Archive > Cobol > July 2006 > No Compiler Warning in Cobol MicroFocus
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
No Compiler Warning in Cobol MicroFocus
|
|
|
| We use a MicroFocus Compiler on Unix.
On Z/OS the IBM COBOL for OS/390 & VM 2.2.2 Compiler
I found some lines in the source where an
Move from an Pic X(2) Field to an PIC S9(4) is done.
A PIC X(2)
B PIC S9(4)
Move A to B
(no warnings)
Nor on the Host, not on Unix with the Microfocus compiler I get an
warning.
What can I do, to get from the MicroFocus Compiler a warning.
Is there any Compiler-Option to get warnings?
I will find all of this Lines, where an inadequate - Move- is done.
thanks=20
J=F6rg
| |
| William M. Klein 2006-07-10, 6:55 pm |
| Are you using FLAG(COB370) - or some flagging of IBM mainframe dialect for your
Unix compile? If not, what is your FLAG directive set to?
--
Bill Klein
wmklein <at> ix.netcom.com
"JB" <Joerg.Brehe@set-software.de> wrote in message
news:1152542932.766264.60100@p79g2000cwp.googlegroups.com...
We use a MicroFocus Compiler on Unix.
On Z/OS the IBM COBOL for OS/390 & VM 2.2.2 Compiler
I found some lines in the source where an
Move from an Pic X(2) Field to an PIC S9(4) is done.
A PIC X(2)
B PIC S9(4)
Move A to B
(no warnings)
Nor on the Host, not on Unix with the Microfocus compiler I get an
warning.
What can I do, to get from the MicroFocus Compiler a warning.
Is there any Compiler-Option to get warnings?
I will find all of this Lines, where an inadequate - Move- is done.
thanks
Jörg
| |
| Colin Campbell 2006-07-10, 6:55 pm |
| JB wrote:
> We use a MicroFocus Compiler on Unix.
> On Z/OS the IBM COBOL for OS/390 & VM 2.2.2 Compiler
>
> I found some lines in the source where an
> Move from an Pic X(2) Field to an PIC S9(4) is done.
>
> A PIC X(2)
> B PIC S9(4)
>
> Move A to B
> (no warnings)
>
> Nor on the Host, not on Unix with the Microfocus compiler I get an
> warning.
>
> What can I do, to get from the MicroFocus Compiler a warning.
>
> Is there any Compiler-Option to get warnings?
>
> I will find all of this Lines, where an inadequate - Move- is done.
>
> thanks
>
> Jörg
>
>
The ANSI COBOL Standard (I looked at my copy of the 1985 ANSI COBOL
standard manual) defines a MOVE of alphanumeric to numeric as a valid
move. So why do you want a warning?
The MicroFocus and IBM documentation will undoubtedly tell you how the
MOVE will be done.
| |
| William M. Klein 2006-07-10, 6:55 pm |
| Colin,
I haven't looked it up (in either the IBM documentation or the '85 Standard)
but my MEMORY is that you may move a numeric to an alphanumeric but ONLY if the
numeric is an unsigned integer. (I may have this backwards and that this is
when you can move an alphanumeric to numeric) but I do remember that there are
some rules about NOT having a sign.
--
Bill Klein
wmklein <at> ix.netcom.com
"Colin Campbell" <cmcampb@adelphia.net> wrote in message
news:LaidnYbCxoCLMi_ZnZ2dnUVZ_qmdnZ2d@ad
elphia.com...
> JB wrote:
> The ANSI COBOL Standard (I looked at my copy of the 1985 ANSI COBOL standard
> manual) defines a MOVE of alphanumeric to numeric as a valid move. So why do
> you want a warning?
>
> The MicroFocus and IBM documentation will undoubtedly tell you how the MOVE
> will be done.
|
|
|
|
|