View previous topic :: View next topic
|
Author |
Message |
andy12
New User
.jpg)
Joined: 30 Apr 2020 Posts: 15 Location: United States
|
|
|
|
I need to convert a date format which is in YYDDDD(Year 2 digits and Julian date) followed by timestamp which is hhmmss. below is my file layout
input file:
----+----1----+----2----+----3----+----4----+----5
********************************* Top of Data ****
YS 01241940155514 22USABCDEF
YYDDD hhmmss 22 ABCDEF
YY - Pos (9) - 2 bytes
DDD - Pos (11) - 3 bytes.
hhmmss - Pos (15) - 6 bytes.
rec-Code - Pos (41) - 2 bytes
rec-type - Pos (43) - 6 bytes
Output format
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
********************************* Top of Data **************
2024/07/12-15.55.14.000000 22 ABCD
Output
Pos (20) - YYYY/MM/DD-hh.mm.ss.000000
Pos (60) - rec-code - 2 bytes
pos (62) - rec-type - 6 bytes.
Tried with INREC BUILD=(1,5,Y2T,DT=(MD4/)) but still overlay and build not working as expected.
Appreciate your help |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2174 Location: USA
|
|
|
|
0. SYNCSORT, and DFSORT/ICETOOL questions (for some reason) are supposed to be in different forums.
1. Please, post your message in this format:
andy12 wrote: |
I need to convert a date format which is in YYDDDD(Year 2 digits and Julian date) followed by timestamp which is hhmmss. below is my file layout
input file:
Code: |
----+----1----+----2----+----3----+----4----+----5
********************************* Top of Data ****
YS 01241940155514 22USABCDEF
YYDDD hhmmss 22 ABCDEF
|
YY - Pos (9) - 2 bytes
DDD - Pos (11) - 3 bytes.
hhmmss - Pos (15) - 6 bytes.
rec-Code - Pos (41) - 2 bytes
rec-type - Pos (43) - 6 bytes
Output format
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
********************************* Top of Data **************
2024/07/12-15.55.14.000000 22 ABCD
|
Output
Pos (20) - YYYY/MM/DD-hh.mm.ss.000000
Pos (60) - rec-code - 2 bytes
pos (62) - rec-type - 6 bytes.
Tried with INREC BUILD=(1,5,Y2T,DT=(MD4/)) but still overlay and build not working as expected.
Appreciate your help |
2. Present IN FULL:
- the code you have tried,
- input data,
- produced results,
- error/warning messages, if any. |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1370 Location: Bamberg, Germany
|
|
|
|
You can use BUILD to construct the new record from the beginning, or use OVERLAY to modify where needed. The latter will see all updates to the record you do, be careful.
As sergeyken has pointed out, please use the code button when presenting code/data to the forum. |
|
Back to top |
|
 |
andy12
New User
.jpg)
Joined: 30 Apr 2020 Posts: 15 Location: United States
|
|
|
|
sergeyken wrote: |
0. SYNCSORT, and DFSORT/ICETOOL questions (for some reason) are supposed to be in different forums.
1. Please, post your message in this format:
andy12 wrote: |
I need to convert a date format which is in YYDDDD(Year 2 digits and Julian date) followed by timestamp which is hhmmss. below is my file layout
input file:
Code: |
----+----1----+----2----+----3----+----4----+----5
********************************* Top of Data ****
YS 01241940155514 22USABCDEF
YYDDD hhmmss 22 ABCDEF
|
YY - Pos (9) - 2 bytes
DDD - Pos (11) - 3 bytes.
hhmmss - Pos (15) - 6 bytes.
rec-Code - Pos (41) - 2 bytes
rec-type - Pos (43) - 6 bytes
Output format
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
********************************* Top of Data **************
2024/07/12-15.55.14.000000 22 ABCD
|
Output
Pos (20) - YYYY/MM/DD-hh.mm.ss.000000
Pos (60) - rec-code - 2 bytes
pos (62) - rec-type - 6 bytes.
Tried with INREC BUILD=(1,5,Y2T,DT=(MD4/)) but still overlay and build not working as expected.
Appreciate your help |
2. Present IN FULL:
- the code you have tried,
- input data,
- produced results,
- error/warning messages, if any. |
Thanks for your reply. How do i post the mainframe screenshot like here? |
|
Back to top |
|
 |
andy12
New User
.jpg)
Joined: 30 Apr 2020 Posts: 15 Location: United States
|
|
|
|
Joerg.Findeisen wrote: |
You can use BUILD to construct the new record from the beginning, or use OVERLAY to modify where needed. The latter will see all updates to the record you do, be careful.
As sergeyken has pointed out, please use the code button when presenting code/data to the forum. |
Thanks for your reply, I was able to get the desired output. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2174 Location: USA
|
|
|
|
andy12 wrote: |
How do i post the mainframe screenshot like here? |
1. Select all or desired part of "mainframe screenshot", and press Ctrl-C (if in a Windows emulator)
2. Click Code button in your message, paste your copied text using Ctrl-V, and click Code button again. |
|
Back to top |
|
 |
andy12
New User
.jpg)
Joined: 30 Apr 2020 Posts: 15 Location: United States
|
|
|
|
sergeyken wrote: |
andy12 wrote: |
How do i post the mainframe screenshot like here? |
1. Select all or desired part of "mainframe screenshot", and press Ctrl-C (if in a Windows emulator)
2. Click Code button in your message, paste your copied text using Ctrl-V, and click Code button again. |
Thanks |
|
Back to top |
|
 |
|