Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to add date & timestamp to the end of the record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dharmaraok

New User


Joined: 10 Mar 2011
Posts: 39
Location: india

PostPosted: Thu Apr 18, 2019 2:45 pm    Post subject: how to add date & timestamp to the end of the record
Reply with quote

I need to add date & timestamp to the end of the record .

I am using the below sort card:

INREC FIELDS=(1:1,6,7:DATE4) but i am not getting any value.

Input :
Dharma

Output should be:
DharmayyyyMMddHHmmssSS5

Please let me know how to do it
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2190
Location: Hampshire, UK

PostPosted: Thu Apr 18, 2019 3:14 pm    Post subject: Reply to: how to add date & timestamp to the end of the record
Reply with quote

Surely it should be on the output phase and possibly using BUILD?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1054
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Apr 18, 2019 3:23 pm    Post subject:
Reply with quote

The following works for me but the result is not quite as you say you expect.

Code:
  OPTION COPY                 
  INREC FIELDS=(1:1,6,7:DATE4)


result has separators:

Code:
Dharma2019-04-18-10.50.44



Garry
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8784
Location: Welsh Wales

PostPosted: Thu Apr 18, 2019 3:45 pm    Post subject:
Reply with quote

Are you sure that you are using DFSORT rather than SYNCSORT - although very similar there may be differences

See here http://ibmmainframes.com/viewtopic.php?t=33389

If you are getting WER messages, you are using SYNCSORT
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 475
Location: Maryland

PostPosted: Fri Apr 19, 2019 7:05 pm    Post subject: Re: how to add date & timestamp to the end of the record
Reply with quote

dharmaraok wrote:
I am using the below sort card:
INREC FIELDS=(1:1,6,7:DATE4) but i am not getting any value.

Please, clarify what do you mean, exactly:
    - did you get no records in your output?
    - did you get a record with only 6 first characters?
    - did you get a record with 6 first characters followed by blanks/zeroes?
    - did you get a record with 6 first characters followed by a sort of garbage?
    - did you really provide any input non-empty dataset when calling SORT?
    - did you get no output dataset ("file") at all?
    - did you get any error message in the SORT log?
    - did you get any clarification/explanation/statistics message in your SORT log?
    - did you get no SORT log at all?
    - did you get JCL error, and your job was not run at all?
    - whatever else?


It sounds like
Quote:
I tried to drive my car but I'm not getting to my destination.
What do I wrong?
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 24
Location: Germany

PostPosted: Mon Apr 22, 2019 12:29 pm    Post subject:
Reply with quote

Is the red marked desired output a fixed constant?
Quote:
yyyyMMddHHmmssSS5


If yes, use what Garry has suggested but instead of BUILD use OVERLAY and go on there with an UFF conversion. Blank out excessive fields, but you should see yourself what to do.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need to write the date at the end of ... Poha Eater DFSORT/ICETOOL 2 Tue Jul 23, 2019 2:33 pm
No new posts Removing duplicate record based on th... Nilanjan Sikdar DFSORT/ICETOOL 8 Mon Jul 22, 2019 8:29 pm
No new posts SQL to retrieve latest Eff date and then vinu78 DB2 8 Tue Apr 30, 2019 3:45 pm
No new posts files whose record count varies with ... janmejay CA Products 0 Fri Mar 08, 2019 9:35 pm
No new posts HEADER1 with Date arithmetic Martin-2000 DFSORT/ICETOOL 4 Thu Feb 21, 2019 3:24 pm

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