Page 1 of 1

Parse time with COLON :

PostPosted: Mon Mar 28, 2011 9:38 pm
by Kitz
Hello, my file contains time in HHSS (1630) format. I need Colon : to be displayed after HH and before SS. ie., in HH:SS.

Thanks & Regards,
Kitz

Re: Parse time with COLON :

PostPosted: Mon Mar 28, 2011 11:14 pm
by Frank Yaeger
There are several ways to do this with DFSORT with BUILD such as using p1,2,C':',p2,2 or p,4,EDIT=(TT:TT)

If you want more specific help, you need to give more specific requirements. Show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of your the input file.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080

Re: Parse time with COLON :

PostPosted: Tue Mar 29, 2011 3:01 pm
by Kitz
Hi Frank,

Thanks for your quick reply.
My file length is 80 and it appears like below:

xxxxxxxxx xxxxx 16.03.2011/1630
xxxxxxxxx xxxxx 25.01.2010/1220
xxxxxxxxx xxxxx 19.03.2011/1910

Currently, time is shown as HHSS. I want to rewrite the rewrite the file with a COLON after HH and before SS

Something like below:
xxxxxxxxx xxxxx 16.03.2011/16:30
xxxxxxxxx xxxxx 25.01.2010/12:20
xxxxxxxxx xxxxx 19.03.2011/19:10

Thanks & Regards,
Kitz

Re: Parse time with COLON :

PostPosted: Tue Mar 29, 2011 7:28 pm
by Kitz
Frank,
Thank you very much.
It worked with ZD,EDIT=(TT:TT) using DFSORT.

Thanks & Regards,
Kitz