HP3000-L Archives

January 1999, Week 5

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:
John Zoltak <[log in to unmask]>
Reply To:
John Zoltak <[log in to unmask]>
Date:
Fri, 29 Jan 1999 13:59:38 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
Tony,

use the ON SIZE ERROR clause for error handling.

Compute out-date = function integer-of-date(in-date)
on size error
    move -1 to out-date.

Here if there is a conversion failure, out-date will be -1.

Hope this helps
John Zoltak
North American Mfg Co

-----Original Message-----
From: Tony Furnivall [mailto:[log in to unmask]]
Sent: Friday, January 29, 1999 1:13 PM
To: [log in to unmask]
Subject: [HP3000-L] COBOL Date functions


Hi!
I'm asking for an internal client, who discovered this aspect of the
COBOL
date functions, if anyone knows any workarounds, (other than edit the
date
yourself!).

If an invalid date is passed to the Integer-Of-Date function, then the
process aborts in a spectacular fashion. There is no visible means of
getting a status
value or message back, so I'm not surprised. However, I was wondering if
there are any other methods of getting a COBOL function to return a
status
value that are not immediately apparent.

Thanks in advance,

TOny

ATOM RSS1 RSS2