MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Time in hhmmss.sss format

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mangsk
Beginner


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Thu Feb 01, 2007 4:24 pm    Post subject: Time in hhmmss.sss format Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Feb 01, 2007 5:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Fri Feb 02, 2007 3:09 am    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Feb 02, 2007 6:16 am    Post subject: Reply with quote

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
View user's profile Send private message
blitz2
Beginner


Joined: 23 Jan 2007
Posts: 84
Topics: 14

PostPosted: Fri Feb 02, 2007 8:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group