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 of Files

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

New User


Joined: 13 Oct 2009
Posts: 11
Location: India

PostPosted: Fri Apr 09, 2010 11:03 am    Post subject: Merging of Files
Reply with quote

Hi , I need to merge the records of 3 files .

But , i ll have to check the count field (count field will be in the line 3 of the file , pos : 5 , len :2) in the file and only if is greater than 05 , i ll have to take that file into account else i ll have to drop that file from being merged .

How can i achieve this ? plz help me .
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Apr 09, 2010 11:13 am    Post subject:
Reply with quote

Assist with following...

1: Show us sample records in the file with expected output for the same.. both cases when file is skipped for merging and considered for merging(use code tags)

2: RECFM and LRECL of the file?
Back to top
View user's profile Send private message
Valli Vaithilingam

New User


Joined: 13 Oct 2009
Posts: 11
Location: India

PostPosted: Fri Apr 09, 2010 11:49 am    Post subject:
Reply with quote

File 1 :
Code:


------------------------------------------------
REASON : CASE-1                             
                                                 
  aaa            bbbb            ccc                   
------        ----------        ---------                 
000002   0000940010   000015557                 
000002   0000940278   000589246                 
000002   0000940284   000625529                 
000002   0000940330   000012446                 
000002   0000940331   000010667                 
                                                 
COUNT =000005                                   
------------------------------------------------



File 2 :

Code:


------------------------------------------------
REASON : CASE-2           

  aaa          bbbb                ccc                   
------        ----------          ---------                   
                                                 
COUNT =000000                                 
------------------------------------------------



File 3 :

Code:


------------------------------------------------
REASON : CASE-3                             
                                                 
  aaa          bbbb                ccc                   
------        ----------          ---------                 
000005   0007840010   000090057                 
000005   0009130278   000666246                 
         
COUNT =000002                                 
------------------------------------------------



File 1 & 3 are to be merged and 2 shud be dropped.

My o/p :
Code:


Header : Final Report After Merging
------------------------------------------------
REASON : CASE-1                             
                                                 
  aaa            bbbb            ccc                   
------        ----------        ---------                 
000002   0000940010   000015557                 
000002   0000940278   000589246                 
000002   0000940284   000625529                 
000002   0000940330   000012446                 
000002   0000940331   000010667                 
                                                 
COUNT =000005                                   
------------------------------------------------
------------------------------------------------
REASON : CASE-3                             
                                                 
  aaa          bbbb                ccc                   
------        ----------          ---------                 
000005   0007840010   000090057                 
000005   0009130278   000666246                 
         
COUNT =000002                                 
------------------------------------------------

Back to top
View user's profile Send private message
Valli Vaithilingam

New User


Joined: 13 Oct 2009
Posts: 11
Location: India

PostPosted: Fri Apr 09, 2010 11:51 am    Post subject:
Reply with quote

Misstated the count field in my initial post :
count field will be in the line 3 of the file , pos : 5 , len :2
Plz refer the code of my latest entry . That's the correct one

Count > 0 , should be merged.
Back to top
View user's profile Send private message
Valli Vaithilingam

New User


Joined: 13 Oct 2009
Posts: 11
Location: India

PostPosted: Fri Apr 09, 2010 11:55 am    Post subject:
Reply with quote

These three i/p files are temp files .

No limits on LRECL & RECFM
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Apr 09, 2010 12:02 pm    Post subject:
Reply with quote

Valli Vaithilingam wrote:
These three i/p files are temp files .

No limits on LRECL & RECFM
icon_eek.gif

Is it a homework??? or you are getting this done for fun icon_evil.gif

BTW none of input you have shown is having count (pos:5 len:2) at line now 3?
Back to top
View user's profile Send private message
Valli Vaithilingam

New User


Joined: 13 Oct 2009
Posts: 11
Location: India

PostPosted: Fri Apr 09, 2010 12:09 pm    Post subject:
Reply with quote

Sambhaji wrote:
Valli Vaithilingam wrote:
These three i/p files are temp files .

No limits on LRECL & RECFM
icon_eek.gif

Is it a homework??? or you are getting this done for fun icon_evil.gif

BTW none of input you have shown is having count (pos:5 len:2) at line now 3?


@ Sambhaji : Not doing for fun at all .. Just wanted to learn . Am juz a beginner icon_sad.gif

Plz ignore my initial post about count field . Juzt have the code for ref and help me !!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 09, 2010 9:57 pm    Post subject:
Reply with quote

Quote:
Plz ignore my initial post about count field . Juzt have the code for ref and help me !!


How can the count record be identified? Does it have 'COUNT' in positions 1-5?
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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

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