HP3000-L Archives

December 2003, Week 2

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:
Brian Donaldson <[log in to unmask]>
Reply To:
Brian Donaldson <[log in to unmask]>
Date:
Fri, 12 Dec 2003 10:54:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (19 lines)
In a message dated 12/12/03 7:25:29 AM Pacific Standard Time,
[log in to unmask] writes:
I'm trying to understand the customers code.  They move a PIC X(8) into a
binary variable (well a COMP type which I thought was binary).  How does
COBOL know that the PIC X(8) contains a binary value rather than an ASCII
string like "200"?

This is probably an error (illegal ascii digit error). It doesn't show up
at run time because the $CONTROL at the top of your source code probably
doesn't specify the VALIDATE option. Change the PIC X(8) to a PIC 9(8) and
then move the PIC 9(8) field to the COMP binary field.

Moving "X" type fields straight into COMP fields doesn't work !

Brian Donaldson.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2