Subject: | |
From: | |
Reply To: | |
Date: | Fri, 29 Jan 1999 13:59:38 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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
|
|
|