Subject: | |
From: | |
Reply To: | |
Date: | Tue, 20 Oct 1998 10:19:53 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hello Mark,
As far as I am aware, it will not be possible to simply replace your
existing ACCEPT statements with another ACCEPT statement which will
return the desired 8 digit date - but I could be wrong!
Therefore, I think you will have to look at using an intrinsic, or
writing your own subroutine.
HP have provided several new date related intrinsics (I think from PP4
onwards). You may want to look at the following URL for more
information...
http://jazz.external.hp.com/papers/Communicator/5.5/exp4/cmdate.html
<http://jazz.external.hp.com/papers/Communicator/5.5/exp4/cmdate.html>
..if you use one of the HP intrinsics, you can probably do something
like...
ACCEPT date-field FROM DATE.
CALL INTRINSIC "HPDATECONVERT" using lots of parameters...
If all you want to do in ALL cases is to convert the X6(yymmdd) date
returned by ACCEPT to an X8(ccyymmdd) date, you may find it easier to
code your own subroutine. You can get away with just 2 or 3 parameters
this way (one for the input date, one for the output date, one for
status) - lots less typing!
You could even go as far as including the "ACCEPT date FROM DATE" within
the subroutine. Then within your programs you just need to replace your
ACCEPT lines with 'CALL "newsubroutine" using DATE-FIELD, status' - lots
lots less typing. Oh, and don't forget to change your receiving date
fields to X8's.
Many thanks
David
(ex 4321)
-----Original Message-----
From: Mark Gallaher [SMTP:[log in to unmask]]
Sent: 20 October 1998 03:34
To: [log in to unmask]
Subject: HP Cobol and 4-digit years?
* Please Note : This message was received from the Internet *
_____________________________________________________________
Hello!
Can anyone help; I'd like to receive a yyyymmdd-type date from
Cobol. I
currently use "accept work-date from date", but of course that
provides only
the yymmdd-type date.
Is there another function available from Cobol? Thanks in
advance.
__________________________________________________________________
Confidentiality Notice
This message may contain privileged and confidential information. If you think, for any reason, that this message may have been addressed to you in error, you must not disseminate, copy or take any action in reliance on it, and we would ask you to notify us immediately by return email to "[log in to unmask]".
|
|
|