× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is how we do it here - I believe that COBOL can give a time to the hundredths, but can not break it down finer than that.


Jim


      *---------------------------------------------------------------------*
       WORKING-STORAGE SECTION.
      *---------------------------------------------------------------------*
       01 Working-Variables.
           05 Ws-Date-Time.
              10 Ws-Date        Format DATE '@Y%m%d'.
      *      format of date is CCYYMMDD
              10 Ws-Time        Format TIME '%H%M%S@Sh'.
      *      format of Time is HHMMSShh
              10 Ws-Offset-Ind              Pic  X(1).
              10 Ws-Offset-HH               Pic S9(2).
              10 Ws-Offset-MM               Pic S9(2).

       01 Ws-DTS  FORMAT TIMESTAMP.
      /
       PROCEDURE DIVISION.

      *---------------------------------------------------------------------*
      * OPENING MODULE
      *---------------------------------------------------------------------*

0100-CONTROL-MODULE.

             Move Function CURRENT-DATE      to Ws-Date-Time.
             Move  Ws-Date                   to Ws-Dts.
             Move  Ws-Time                   to Ws-Dts.





At 10:53 AM 1/13/2004, you wrote:
I know this isn't technically a WDSC question but...



How do you get the system time into a timestamp variable in COBOL?  I know
in RPG you can do it with the following D-spec:



DCurTime S T Inz(*SYS)





Bruce

_______________________________________________
This is the Websphere Development Studio Client for iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.