IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Looking for help with SORT JCL/SYNC sort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
andy12

New User


Joined: 30 Apr 2020
Posts: 15
Location: United States

PostPosted: Tue Jul 16, 2024 12:06 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2174
Location: USA

PostPosted: Tue Jul 16, 2024 12:39 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1370
Location: Bamberg, Germany

PostPosted: Tue Jul 16, 2024 1:35 am
Reply with quote

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
View user's profile Send private message
andy12

New User


Joined: 30 Apr 2020
Posts: 15
Location: United States

PostPosted: Tue Jul 16, 2024 2:20 am
Reply with quote

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
View user's profile Send private message
andy12

New User


Joined: 30 Apr 2020
Posts: 15
Location: United States

PostPosted: Tue Jul 16, 2024 2:40 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2174
Location: USA

PostPosted: Tue Jul 16, 2024 5:59 pm
Reply with quote

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
View user's profile Send private message
andy12

New User


Joined: 30 Apr 2020
Posts: 15
Location: United States

PostPosted: Tue Jul 16, 2024 6:50 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Sort to insert record in an empty file. DFSORT/ICETOOL 5
No new posts Partial Sort conditions for PD fields DFSORT/ICETOOL 16
No new posts Help with SORT - I need to validate d... DFSORT/ICETOOL 11
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
Search our Forums:

Back to Top