Hi All,
I searched the forum but did not get required information.
Iam getting a time value from input file. (e.g., 065535). In the server job, the function Oconv(columnname,"MTS") is being used and the output corresponding value is 18:12:15
Now we are implementing the same as parallel job and Oconv function is not available in parallel jobs. How do I convert the given value to the output value similar to server job.
Thanks in advance,
ssunda.
Function similar to Oconv in parallel jobs
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You use appropriate data type conversion functions, such as StringToDate() and DateToString(). The format string supplied with each of these specifies how the string is formatted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi Ray,
I tried using StringToTime and TimeToString functions with the following syntax:
For input value 065535 , the above functions result is given below
But I want the output value as "18:12:15" for the given input value ( Oconv in server job returns this output)
Regards,
ssunda.
I tried using StringToTime and TimeToString functions with the following syntax:
Code: Select all
date1=StringToTime(input,"%hh%nn%ss")
output=TimeToString(date1,"%hh:%nn:%ss")
Code: Select all
date1:065535 output:06:55:35
Regards,
ssunda.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Stop thinking like a server developer. Oconv is treating 065535 as the number of seconds since midnight. Try the TimeFromSecondsSince() function (I'm guessing the name, so be flexible).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.