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
 
Syncsort OUTREC Convert Time to format hh:mm:ss

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
navhin

New User


Joined: 26 Mar 2007
Posts: 5
Location: india

PostPosted: Mon Aug 24, 2015 6:24 pm    Post subject: Syncsort OUTREC Convert Time to format hh:mm:ss
Reply with quote

Hi,

I am using SYNCSORT to extract data from DB2.

In the extract there is a column of TIME data type . The format of the TIME filed is hh.mm.ss by default. the hours , minutes and seconds are delimited by period.

The following information is available in the sysout after running the SYNCSORT about the specific field.

DB2 data type : TIME
SYNCSORT data type : CH

My requirement is to print the field in the format hh:mm:ss . the hours , minutes and seconds delimited by a colon.

I have read the syncsort prog guide and DFSORT programming guide but i couldn't understand how exactly to achieve this.

I tried using the EDIT option but keep getting syntax errors.

Please help in writing the OUTREC statement where this reformatting will be done using SYNCSORT.

I have other alternatives like to use Overlay after creating extract or DB2 functions to get hours , minutes and seconds separately and concatenate but I want to learn to do it in SYNCSORT using OUTREC while extracting.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Mon Aug 24, 2015 8:26 pm    Post subject: Reply to: Syncsort OUTREC Convert Time to format hh:mm:ss
Reply with quote

Can you show your code, please? In the Code tags.

Why are you so desperate to use OUTREC? Unless you are relying on the result of a SORT or MERGE or SUM, INREC will be fine and a more sensible place to put it.

Have you looked at the data you extracted? Is it delimited already?

As well as your code, show sample input, expected result, received result.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1247
Location: Israel

PostPosted: Tue Aug 25, 2015 1:18 pm    Post subject: Reply to: Syncsort OUTREC Convert Time to format hh:mm:ss
Reply with quote

Bring the time already with colons by selecting:
Code:
CHAR(MY_TIME,JIS) AS MY_NEW_TIME


I tried all the options (ISO,USA,EUR,JIS,LOCAL)
JIS worked for me.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1247
Location: Israel

PostPosted: Tue Aug 25, 2015 1:27 pm    Post subject:
Reply with quote

After some research:
JIS stands for "Japanese industrial standard" and time is shown as hh:mm:ss
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm

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