HP3000-L Archives

October 1997, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Anderson, Michael" <[log in to unmask]>
Reply To:
Anderson, Michael
Date:
Wed, 15 Oct 1997 13:01:29 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
I've experienced slightly different behavior in COBOL. It's seems to me
that only when using the MOVE statement does the SIZE edit to occur.
Because the MOVE statement is responsible for data conversion. I have
even used the COMPUTE statement to get around the SIZE limitations
related to the MOVE statement. So Surely linkage to an external program,
no matter what language it is it wouldn't apply any data conversion
rules related to size. The only limitations to size during interprogram
communications is that each item must be the same number of bytes/bites.
It's how the receiving program interprets those bites, that's what
matters.

>-----Original Message-----
>From:  Rick Brooks [SMTP:[log in to unmask]]
>Sent:  Wednesday, October 15, 1997 11:14 AM
>To:    [log in to unmask]
>Subject:       Re: C conversion question
>
>Why not a COBOL routine?
>
>LINKAGE SECTION
>
> 01  C-PARM         PIC S9(9) COMP.       ;Putatively an integer
> 01  COBOL-PARM     PIC S9(9) COMP-3.     ;A packed variable
>
>PROCEDURE DIVISION
>
>
><stuff>
>
> MOVE  C-PARM TO COBOL-PARM.
>
>I believe that event though an S9(9) COMP and a C int are both 32 bit
>(or sign+31 bit) integers, COBOL still relies on the number of digits
>listed in the
>PICTURE.  Therefore, the full range of a signed C int extends to 10
>digits
>and can't be fully represented in COBOL-which will truncate the item
>unless care is taken with ON SIZE ERROR phrases.
>

ATOM RSS1 RSS2