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 getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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