File status Error "46"



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: How to solve File status code 46 for the below code

Postby BillyBoyo » Wed Jan 04, 2012 7:19 pm

Follow on:

I've been assuming that you have a task which can be achieved (reasonably).

To stop assuming that:

  1. The files have to be in the same "order", even though the files are not sequenced. Record two (match) on file two must appear after Record one (match) and before Record three (match). This must, similarly, but true for all the matches.
  2. All the data on file one must match with data on file two.
  3. Duplicates can be handled, but have to be coded-for with an exact knowledge of the particular possibilities.

So, if you can describe your data for us, what the match is done on and show us some sample data and confirm that everything meets the above criteria, then we can assist.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Re: How to solve File status code 46 for the below code

 

Re: How to solve File status code 46 for the below code

Postby dick scherrer » Wed Jan 04, 2012 11:29 pm

Hello,

Why does someone believe you need to write code to "match" 2 files with no common key on which the files can be sorted/compared?

If you only want to see if the files/records are the same or different, suggest you consider the utility superc.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: How to solve File status code 46 for the below code

Postby BillyBoyo » Thu Jan 05, 2012 12:49 am

I've used it for analysing text files. Extract paragraphs which contain particular words. Select from those paragraphs the words in particular combinations/amounts. Go back to the source file to get the article titles using the paragraph. Decide again which to take depending on the relevance of the title. Go back to the text file to pull the whole article using the title.

To do the match, take the two-file merge and turn it "sideways" as I like to call it. It is the same thing, just with a driver file, and read-until-match on one file only (rather than file with lowest key).

I guess any data which does not have a natural key and from which the final driver file has been originally sourced.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post