Sorry I didn't expound re PAUSE via COBOL. As DBurney points out, COBOL
doesn't speak HP Real, PAUSE does. I'm having trouble locating docs for the
cheater used here, HPEXTIN, but the parms in the example cause it to return
an HP Real equivalent to the integer value passed. Anybody know where to
read the gory details of HPEXTIN?
Tracy
IDENTIFICATION DIVISION.
PROGRAM-ID. PAUSE.
REMARKS. just demo's COBOL usage of the PAUSE intrinsic.
* which requires a REAL parm, not COBOL-supported. Cheat via HPEXTIN.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 CHAR-STRING PIC 9999.
01 STRING-LEN PIC S9(4) COMP.
01 REAL-SECS PIC S9(9) COMP.
01 ERRCODE PIC S9(4) COMP.
01 INT-SECS PIC S9(4) COMP VALUE 1.
PROCEDURE DIVISION.
OUTER-BLOCK SECTION.
PERFORM UNTIL INT-SECS = 0
DISPLAY "Enter PAUSE time in secs, 0=quit; format is 9999:"
NO ADVANCING
ACCEPT CHAR-STRING
INSPECT CHAR-STRING REPLACING ALL SPACE BY "0"
CALL INTRINSIC ".LEN." USING CHAR-STRING GIVING STRING-LEN
CALL INTRINSIC "HPEXTIN" USING CHAR-STRING STRING-LEN
0 1 0 0 REAL-SECS ERRCODE
IF ERRCODE <> 0
DISPLAY "HPEXTIN ERROR= " ERRCODE
ELSE
DISPLAY TIME-OF-DAY "PAUSING..."
CALL INTRINSIC "PAUSE" USING REAL-SECS
DISPLAY TIME-OF-DAY
DISPLAY " "
END-IF
END-PERFORM
> -----Original Message-----
> From: Doug Becker [mailto:[log in to unmask]]
> Sent: Monday, July 10, 2000 10:05 AM
> To: [log in to unmask]
> Subject: Re: Pause Intrinsic and Turbo Image Manual
>
>
> The problem here is that there is no COBOL comp-1 or comp-2
> USAGE items in =
> the PICTURE clause.
>
> In the past, we wrote an SPL routine to do the conversion.
>
> At our shop, we could use C ( C is COBOL without the OBOL ),
> but this =
> option is not open to all.
>
> Of course, you could use hexadecimal PICTURE high order byte
> with a value =
> something like X'4000' (octal is more fun, though) and a lower value =
> BINARY field, all redefined to make it come out right.
>
> Have not tried the HPCICOMMAND intrinsic for "PAUSE nnnn"
> from COBOL, but =
> as mentioned before, that SHOULD work.
>
> >>> David Burney <[log in to unmask]> 07/10 9:47 AM >>>
> Ooops. Aparently there is a Pause Intrinsic.
>
> According to :
>
> http://docs.hp.com/cgi-bin/doc3k/B3265090821.13550/192=20
>
> The format is :
>
> NM and CM callable
>
> Suspends the calling process for a specified number of seconds.
>
> Syntax :
>
> 32R
> Pause (interval);
>
> Interval 32-bit real by reference (required)
> Passes the amount of time, in seconds
> that the process pauses. The value of
> interval must be positive. The maximum
> time allowed is approximately
> 2,147,484 seconds (almost 25 days).
>
>
> On Monday, July 10, 2000 1:15 PM, gts wrote:
> : All,
> :
> : Can anyone give me the pause Intrinsic Syntax in Cobol, and
> does anyone
> : know the easiest way to get a Turbo Image manual. Thanks
> :
> : Chris Miller
> : Genesis Total Solutions, Inc.
>
>
> --------------------------------------------------------------
> -------------=
> -
> -------
> David Burney
> [log in to unmask]
> com=20
> Summit Racing Equipment
> http://www.summitracing.com=20
> -----------
> Does the phrase "To be quite honest..." mean that the person has
> been less than honest before that point ?
>
> -----------
> All opinions expressed herein are my own and reflect,
> in no way, those of my employer.
>
|