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: 1586
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: 2632
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

Active User


Joined: 15 Aug 2015
Posts: 452
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
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 Extract 2 more lines below line that ... DFSORT/ICETOOL 2
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts How to find orphaned MCDS D records. JCL & VSAM 15
No new posts Selecting multiple constant records DB2 3
This topic is locked: you cannot edit posts or make replies. Writng matched records into output fi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top