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:
Peter Smithson <[log in to unmask]>
Reply To:
Peter Smithson <[log in to unmask]>
Date:
Fri, 12 Dec 2003 04:18:56 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
 In article <[log in to unmask]>,
[log in to unmask] says...
<snip>
> 3.  COBOL performs data conversion when moving from one type of field
> to another (e.g. display to comp, display alphanumeric to display
> numeric, comp to comp-3, etc.).  Use the same datatypes where possible
> to avoid unwanted conversions.

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"?

The reason this doesn't work on ACU COBOL is that ACU tries to interpret
@4<0><0> as an ASCII string.  So this code will work on MPE but not on
ACU COBOL with an emulation of HPEXTIN.

> 4.  It appears you're going to use this to call the PAUSE intrinsic.
> PAUSE takes a single-precision floating point number
> (RETURN-TYPE-REAL).  If you change LONG-NBR to S9(9) BINARY (and
> change/remove the initializing MOVE), you can simply CALL INTRINSIC
> PAUSE USING LONG-NBR after the CALL to HPEXTIN to pause your program
> 20 seconds.
>
I'll give that a go.

Thanks.

--
http://www.beluga.freeserve.co.uk

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

ATOM RSS1 RSS2