Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Merging 2 records at multiple rows with no key fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Bijesh

New User


Joined: 05 Dec 2017
Posts: 1
Location: USA

PostPosted: Wed Dec 06, 2017 1:50 am    Post subject: Merging 2 records at multiple rows with no key fields
Reply with quote

Hi,

My requirement is as below. There are two records shown below starting with Line 1 as rec 1 and next Line 1 as rec 2. Each Line 1 is the beginning of a record. I need to take 3 bytes from the row starting with REPORT (20:3) and merge with DATA rows(only if the fields from 78:20 in the DATA row is having a certain value).
INPUT
Code:
Line 1
Line 2
 REPORT: XXXXXX-YY CAY M#$
 ROW 1                                                   
 ROW 2                                                   
 ROW 3                                                   
 HEADER                                                   
 BLANK                                                   
 DATA1(120 LENGTH- IDENTIFIER FIELD 78:20 )       
 DATA2(120 LENGTH- IDENTIFIER FIELD 78:20 )       
 ...                                   

Line 1
Line 2                   
 REPORT: XXXXXX-YY WIX M#$                               
 ROW 1                                                   
 ROW 2                                                   
 ROW 3                                                   
 HEADER                                                   
 BLANK                                                   
 DATA(120 LENGTH- IDENTIFIER FIELD 78:20 )     


OUT Put needs to be

Code:
CAYDATA1     
CAYDATA2
WIXDATA


We can do it via a cobol program but would it be feasible via a sort or ice tool ? Please let me know.

EDIT: Code'd
Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 298
Location: Maryland

PostPosted: Wed Dec 06, 2017 1:57 am    Post subject: Re: Merging 2 records at multiple rows with no key fields
Reply with quote

Bijesh wrote:
Hi,

We can do it via a cobol program but would it be feasible via a sort or ice tool ? Please let me know.

FYI: Yes, it is possible.

1) RTFM, and/or search in Forum/Google
2) Try
3) Post your results
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2352
Location: @my desk

PostPosted: Tue Dec 12, 2017 6:55 pm    Post subject:
Reply with quote

Bijesh,

Welcome to the forums. Look for 'WHEN=GROUP' examples here. You could OMIT unwanted records and use WHEN=GROUP to identify the 'groups' starting with 'REPORT' and PUSH the 3-byte field across the group. INCLUDE only the 'DATA' records in your OUTFIL and rearrange the fields as needed in your BUILD.

Use Code tags(Code button in the editor) and do a Preview before posting code/data. Good luck!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us