|
*---------------------------------------------------------------------*
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
*---------------------------------------------------------------------* Move Function CURRENT-DATE to Ws-Date-Time.
Move Ws-Date to Ws-Dts.
Move Ws-Time to Ws-Dts.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 mailing list archive is Copyright 1997-2025 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.