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

Syncsort- Merging two records into one line


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kvgreddy1

New User


Joined: 30 Mar 2021
Posts: 7
Location: India

PostPosted: Tue Mar 30, 2021 11:47 pm
Reply with quote

Hi All,

I have a file with records like this

Code:
00:00:01  AAAAAAAA AAAAAAAA                                         
00:00:01               RECEIVED         SENT         STATE: INACTIVE
00:00:01  BBBBBBBB BBBBBBBB                                         
00:00:01               RECEIVED         SENT         STATE: REPLICATE
00:00:01  CCCCCCCC CCCCCCCC                                         
00:00:01               RECEIVED         SENT         STATE: REPLICATE
00:00:01  DDDDDDDD DDDDDDDD                                         
00:00:01               RECEIVED         SENT         STATE: REPLICATE
00:00:01  EEEEEEEE EEEEEEEE                                         
00:00:01               RECEIVED         SENT         STATE: REPLICATE
00:00:01  FFFFFFFF FFFFFFFF                                         
00:00:01               RECEIVED         SENT         STATE: REPLICATE



this file was generated from SAR. i need rows lines in single line. Is there any simple jcl to extract above file as in below format.
AAAAAAAA, BBBBBBBB, CC.... are the job names and it's status was added in next line. I just need job name and it's status in single row as below.

is file join keys will work here ?

Output File:

Code:
  AAAAAAAA AAAAAAAA                          STATE: INACTIVE
  BBBBBBBB BBBBBBBB                          STATE: REPLICATE
  CCCCCCCC CCCCCCCC                          STATE: REPLICATE
  DDDDDDDD DDDDDDDD                          STATE: REPLICATE
  EEEEEEEE EEEEEEEE                          STATE: REPLICATE
  FFFFFFFF FFFFFFFF                          STATE: REPLICATE
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Mar 30, 2021 11:50 pm
Reply with quote

You need to use


INREC IFTHEN + WHEN=GROUP + RECORDS=2 + PUSH

Plenty of examples available



Moving to SYNCSORT
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Wed Mar 31, 2021 12:10 am
Reply with quote

It looks like you are ignoring earlier provided solutions.
ibmmainframes.com/viewtopic.php?p=351696#351696
ibmmainframes.com/about53716.html
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Wed Mar 31, 2021 1:34 am
Reply with quote

Better start with https://www.ibmmainframeforum.com
Back to top
View user's profile Send private message
CarolynP

New User


Joined: 29 Dec 2021
Posts: 6
Location: United States

PostPosted: Wed Dec 29, 2021 11:42 pm
Reply with quote

I'm trying to use Syncsort and need to insert a date from a control card file into the beginning of records in a second file. Not sure how to get this completed. I've created files for both so that the lrecl is the same.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Thu Dec 30, 2021 12:28 am
Reply with quote

CarolynP wrote:
I'm trying to use Syncsort and need to insert a date from a control card file into the beginning of records in a second file. Not sure how to get this completed. I've created files for both so that the lrecl is the same.

Please start a new topic for your request. Provide samples of input and desired output.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Syncsort help SYNCSORT 3
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts SYNCSORT-DB2 interface SYNCSORT 0
No new posts To Omit records based n SORT condition DFSORT/ICETOOL 6
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 5
Search our Forums:

Back to Top