View previous topic :: View next topic |
Author |
Message |
mangsk Beginner
Joined: 05 Jun 2004 Posts: 46 Topics: 18
|
Posted: Thu Feb 01, 2007 4:24 pm Post subject: Time in hhmmss.sss format |
|
|
Hi,
I need to put the time on the report in hhmmss.sss format.
Is there any way to obtain it without the help of SQL?
I tried "ACCEPT ws-var FROM TIME" and "MOVE FUNCTION CURRENT-DATE" ; but they all have the format as hhmmss.
Thanks in advance!
Mangsk |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Feb 01, 2007 5:41 pm Post subject: |
|
|
Look at the language environment (LE) programmin guide. CEEA2150 - Z/os Language Environment Programming Guide (Doc SA22-7651-05. Sections 3.9.2 and 3.9.3. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Fri Feb 02, 2007 3:09 am Post subject: |
|
|
Dick,
Can you post the exact link for the doc u mentioned ? Correct me if my code is wrong.
mangsk,
Try this code if u want .SS format only ?
Code: |
01 WS-TIME PIC 9(08) VALUE ZEROES.
01 WS-TIME-EDITED PIC X(09) VALUE SPACES.
PROCEDURE DIVISION.
ACCEPT WS-TIME FROM TIME.
MOVE WS-TIME(1:6) TO WS-TIME-EDITED(1:6).
MOVE '.' TO WS-TIME-EDITED(7:1).
MOVE WS-TIME(7:2) TO WS-TIME-EDITED(8:2).
DISPLAY 'TIME BEFORE FORMAT:' WS-TIME.
DISPLAY 'TIME AFTER FORMAT:' WS-TIME-EDITED.
OUTPUT
TIME BEFORE FORMAT:13331474
TIME AFTER FORMAT:133314.74
|
_________________ Shekar
Grow Technically |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Feb 02, 2007 6:16 am Post subject: |
|
|
sorry, i had previously downloaded a copy of the documentation for me. IBM seems to be in a 'change over process' now. I can't find anything. If you have language environment (LE) installed on your computer, your shop should have the documentation.
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/CEEA2150/CCONTENTS?DT=20040714111103
took me a while to find it, but off you go.
CEEA9150 LE Run-Time-Msgs
CEEA3151 LE Prog Ref
CEEA1130 LE debugging guide. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
blitz2 Beginner
Joined: 23 Jan 2007 Posts: 84 Topics: 14
|
Posted: Fri Feb 02, 2007 8:18 am Post subject: |
|
|
links to all manuals available here http://www.mvsforums.com/ _________________ If our constitution allows us free speech, why are there phone bills? |
|
Back to top |
|
|
|
|