Barry, yes, we have sas but I think they want to stay in cobol.  Thanks, though.

John, I forwarded your post to them and with a couple minor tweaks they
think that will be just what they needed, and return their appreciation.
Thanks a bunch.

Joel



>The batch date that you are speaking of is the COBOL ANSI date, not the
>LE date. What I'd do is simply use INTEGER-OF-DATE function to get the
>ANSI date of "1/1/1900". For example:
>
>01 INPUT-DATE-YYYYMMDD PIC 9(8).
>01 INPUT-TIME.
>   05 INPUT-TIME-HH PIC 99.
>   05 INPUT-TIME-MM PIC 99.
>   05 INPUT-TIME-SS PIC 99.
>   05 INPUT-TIME-TH PIC 99.
>01 INPUT-TIME-MS PIC S9(8) BINARY.
>
>ACCEPT INPUT-DATE-YYYYMMDD FROM DATE YYYYMMDD
>ACCEPT INPUT-TIME FROM TIME
>COMPUTE INPUT-TIME-MS=
>
>10*(INPUT-TIME-TH+100*(INPUT-TIME-SS+60*(INPUT-TIME-MM+60*INPUT-TIME-HH)
>))
>END-COMPUTE
>COMPUTE INPUT-DATE = FUNCTION INTEGER-OF-DATE(INPUT-DATE-YYYYMMDD)
>END-COMPUTE
>COMPUTE VSAM-KEY=INPUT-TIME-MS+
>    24*60*60*1000*(INPUT-DATE - FUNCTION INTEGER-OF-DATE(19000101))
>END-COMPUTE
>
>That is 24 hours in a day times 60 minutes in an hour times 60 seconds
>in a minute type 1000 milliseconds in a second times the number of days
>since 1900-01-01 (19000101). If you need down to the millisecond from
>the current date/time.
>
>Note that the above is not test. It may have syntax errors. Corrections
>are left as an exercise for the viewers.
>
>--
>John McKown
>Senior Systems Programmer
>UICI Insurance Center
>Information Technology
>
>This message (including any attachments) contains confidential
>information intended for a specific individual and purpose, and its'
>content is protected by law.  If you are not the intended recipient, you
>should delete this message and are hereby notified that any disclosure,
>copying, or distribution of this transmission, or taking any action
>based on it, is strictly prohibited.
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
>Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to