Hi All,

 


My input files are as follows 

  

File1 --> IMS DB unload - Sequential file having Parent and child combination 

  

SEGMENT1 RAM12345    --> Numeric after name is the key--> 12345  Position - 12  
Length --> 5 

SEGMENT2 .. 

SEGMENT3.. 

SEGMENT4.. 

SEGMENT5.. 

SEGMENT6. . 


SEGMENT1 BAL23456 

SEGMENT2 .. 

SEGMENT3.. 

SEGMENT4.. 

SEGMENT5.. 

SEGMENT6. . 
      : 

      : 


SEGMENT1 MAM34567 

SEGMENT2 .. 

SEGMENT3.. 

SEGMENT4.. 

SEGMENT5.. 

SEGMENT6. . 

  

File2 - Normal segential file --> position to be compared --> 1 length -->5 

12345 

45678 

  


Output required 

  


SEGMENT1 RAM12345   

SEGMENT2 .. 

SEGMENT3.. 

SEGMENT4.. 

SEGMENT5.. 

SEGMENT6. . 

  

My Requirement is, I have to match the two files with the position mentioned 
below 

Say File1 --> 12th position of length 5 --> this is present in SEGMENT1 alone 

      File2 --> 1st position of length 5 

  

IF Compared Key in Segment1 of file1 matches with the file2 below child 
segments also needs to be written in out file. Segments are repetetive (Say we 
can have 5 Segment2 or 1 or it maynot have the segment2 also) and segment1 is 
not in sorted order. If I sort the child segments gets messed up. Iam not able 
to perform linear sort since record size is huge.

  

Hope Iam clear. Any one has a suggestion on finding a suitable logic.
 
Iam fine with COBOL/SYNCSORT/EASYTRIEVE
 
Regards,
Ram Balaji.
                                          
_________________________________________________________________
Bollywood, beauties and the latest flicks on MSN entertainment
http://entertainment.in.msn.com/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to