HP3000-L Archives

January 1995, 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:
Reply To:
Rich Trapp <[log in to unmask]>
Date:
Tue, 10 Jan 1995 15:35:56 MST
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
Rodolfo Lopez asks;
>
> Is there any way of generating a programmatic Pause within a COBOLII
> program? The PAUSE intrinsic requires a 32-bit Real value as a passing
> parameter which COBOL does not support.
>
> [log in to unmask]
 
Yes!
   From my stint at the HP Response Center (greetings to my former fellows!),
I've got several sample COBOL routines to do this.  Here's my favorite one,
which uses HPEXTIN to convert a string to a REAL value:
 
<much COBOLeez omitted>
 WORKING-STORAGE SECTION.
 
 01 string-num pic x(5) value "00005".
 01 string-len pic s9(4) comp value 5.
 01 decplaces  pic s9(4) comp value 0.
 01 datatype   pic s9(4) comp value 1.
 01 scale      pic s9(4) comp value 0.
 01 delims     pic s9(4) comp value 0.
 01 pause-value pic x(4)      value "xxxx".
 01 error1     pic s9(4) comp value 0.
 01 d-error    pic 9(5) value 0.
 
 
<somewhere in PROCEDURE DIVISION land >
 
     CALL INTRINSIC "HPEXTIN" USING string-num, string-len,
          decplaces, datatype, scale, delims, pause-value, error1.
 
     if cc not equal zero
          display "Error on HPEXTIN call"
          move error1 to d-error
          display "Error = " d-error
          goback.
 
     CALL INTRINSIC "PAUSE" USING pause-value.
 
To change the value, simply change the text in "string-num" to the
number of seconds.
 
There are several examples of this on HP SupportLine as well.
Rich
--
______________________________________________________________________
________ Dynamic Information Systems Corp.   |
\!DISC / Rich Trapp                          | My opinions are my own.
 \    /  OMNIDEX Product Manager - IMAGE/SQL | With any luck they're
  \  /   Phone : 303 444-4000                | correct ;-)
   \/    E-mail: [log in to unmask]                |
----------------------------------------------------------------------

ATOM RSS1 RSS2