View previous topic :: View next topic
|
Author |
Message |
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
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 |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2448 Location: Hampshire, UK
|
|
|
|
Surely it should be on the output phase and possibly using BUILD? |
|
Back to top |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1099 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8794 Location: Welsh Wales
|
|
|
|
Are you sure that you are using DFSORT rather than SYNCSORT - although very similar there may be differences
See here ibmmainframes.com/viewtopic.php?t=33389
If you are getting WER messages, you are using SYNCSORT |
|
Back to top |
|
 |
sergeyken
Active Member

Joined: 29 Apr 2008 Posts: 924 Location: Maryland
|
|
|
|
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 |
|
 |
Joerg.Findeisen
Active User

Joined: 15 Aug 2015 Posts: 385 Location: Bamberg, Germany
|
|
|
|
Is the red marked desired output a fixed constant?
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 |
|
 |
|