Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Hi All, How to truncate the Microsecond from the Time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Mon Oct 16, 2006 5:52 pm    Post subject: Hi All, How to truncate the Microsecond from the Time
Reply with quote

Hi All,
I want to truncate the Micro second from the Time Format.

My Input Time Format is 00:20:02.23232 (HH:MM:SS.microsecond)
output File should contain 00:20:02 (HH:MM:SS)

Anyboby knows Please help
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Oct 16, 2006 6:05 pm    Post subject: Re: Hi All, How to truncate the Microsecond from the Time
Reply with quote

In REXX? Any one of the functions:

LEFT
PARSE
SUBSTR

If would think that the LEFT function would be the most straightforward:

hhmmss = LEFT(input_time,8)
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Mon Oct 16, 2006 6:19 pm    Post subject: Re: Hi All, How to truncate the Microsecond from the Time
Reply with quote

Thanks ,
One more Question.

If my Time Format is not fixed length,
for example
1)2:00:01.34343
2)22:00:01.54545

In these case how will it works
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Oct 16, 2006 6:24 pm    Post subject:
Reply with quote

You can use PARSE, SUBSTR or POS.

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 5 Sat May 06, 2017 12:59 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us