[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU-COBOL] New to list
Davyd Ondrejko wrote:
> In standard COBOL, there are also alphanumeric edited fields, which
> allow the /, B and 0 characters. For example, if you move a data item
> with a value of "102899" into a variable with PIC XX/XX/XX, the result
> is "10/28/99". The other characters are used similarly. Moving
> "ABC123" into a PIC XBXX/XXX gives "A BC/123". And so forth.
>
> COBOL 85 introduces a few new tricks that might have an influence on how
> storage is handled in the Gnubol implementation. The most important one
> is the de-editing MOVE. In COBOL 74, moving a PIC S9(4)V99 field into a
> PIC $ZZZ,Z9.99 field was perfectly legal, but moving the latter into the
> former was illegal. COBOL 85 makes that possible. Another trivial (to
> My mind) change that can cause programmers to go nuts is the allowance
> of the decimal point or comma as the rightmost character in a PIC clause
> -- but ONLY if the ending period comes right after.
>
> That means that
>
> 15 MY-VAR1 COMP SYNC PIC 999..
>
> would be valid, but
>
> 15 MY-VAR1 PIC 999. COMP SYNC.
>
> would not be. Why would you want to do that? I don't know, but them's
> the rules.
You're completely right, but I didn't want to discuss Cobol 85 matters, the
Cobol 74 is already enough for some of us in this stage. Not everybody has
expirience in Cobol.
> > That would be great to get that copy. Please send it to :
> > Fred Mobach
> > Den Akker 8
> > 4054 MD Echteld
> > The Netherlands
>
> If you like, I could try to scan it in to the computer and just send it
> via email; might that work better?
Whatever you want I will be gratefull.
> > You will only get that warning if you're using a constant greater than
> > 9999, I assume. Or is the DOS/VSE compiler so nice to check on the value
> > boundaries after each arithmetic operation ?
>
> No, that's the way it works. We use the larger values to pass a large
> comm area in CICS; the variable that goes into the CICS command is
> required to be a signed binary half-word, but sometimes the comm area is
> bigger than 9999 bytes long ...
I see, just the same as in applications on my own TP monitor.
Regards,
Fred
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.