Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us