Have you tried bring both .CSVs into the same spreadsheet, then sorting each in the same manner, and then comparing the two? Dave
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
File comparison
Collapse
X
-
File comparison
Just a thought off the top of my head. Create a DDS with one field, with the size equal to, or greater than, the longest size of data from either of the 2 CSV files. The key to this file would in fact be the one field. Create 2 files using this DDS, and then CPYF FROMFILE(A) TOFILE(DDSfileX) CRTFILE(*YES) FMTOPT(*NOCHK) & CPYF FROMFILE(B) TOFILE(DDSfileY) CRTFILE(*YES) FMTOPT(*NOCHK)where A & B are the 2 CSV files, and DDSfileX & DDSfileY are the 2 files created from the new DDS. When you look (DBU or SQL etc) at the 2 CSV files, there is only ONE field on each of them. The 2 DDSfile's should now be sorted (I think). Alan
Comment
-
File comparison
There are lots of complicated ways of doing this comparison, most of which -- though highly interesting -- would take a lot more time than just eyeballing the files. My suggestion: assuming you have numeric fields in the files, download them both into Excel, run totals and see if they match. If they do and the number of records is also the same, a few spot checks ought to pretty well guarantee that they do (or don't) match. Faster yet: email them both to an accountant :-).
Comment
-
File comparison
Consider copying the files from the IFS to a externally defined files using CPYFRMIMPF. Of course, you'll need to build the target files with DDS or SQL. Then you can sort them as needed and figure out a way to compare them. If you find a good (preferably) free compare program that works on a field by field basis, do let me know. Sam
Comment
-
File comparison
Be careful in using this method. Using hash totals (thats what this method is called) will tell you if you HAVE a problem. It wont tell you if you have NO problems For example (a simple one) 1 1 2 3 4 3 Total 7 7 In this example, the hash totals are BOTH equal (7), but it is fairly easy to see that on an item by item comparison, there are differences. In large files, this difference may not be easy to spot. I'm not saying dont use this method, just that you have to be careful. Been there, been burnt Alan
Comment
-
File comparison
I found a Windows program called Beyond Compare from Scooter Software. It does file and folder comparisons and synchronizing. It has many, many wonderful features. I use it everyday, and it is always a pleasure to work with - unlike some other software. And it only costs $30 for a single license, and is cheaper in volume licensing. I can use it to compare csv (or tab delimited) files using its Data Viewer mode. In this mode, I can designate which columns are key fields, and can choose to sort on these key fields. I use this technique to compare data in Excel spreadsheets. I save the worksheet as a tab-delimited text file, and then use Beyond Compare's Data Viewer to pinpoint any differences. The latest thing I have found to use the software for is to compare the content of PDF files. The details on how to do this are on the website, www.scootersoftware.com
Comment
-
File comparison
I don't have my QSHELL book in front of me, but surely you can sort each file with 'sort' and then use 'cmp' to compare them, all from a CL program. http://publib.boulder.ibm.com/iserie...hz/utility.htm Chris Ringer
Comment
-
File comparison
Hi, There are 2 pgms that generate the same csv file but in different ways. In order to test if the output is the same, I am trying to compare these csv files. But, the pgms have sequenced the records differently, so even if the no. of records are the same, due to differnet sequ.they cannot be compared. Any way to compare or resequence them? Thanx...
Comment
-
File comparison
From a previous note. Consider copying the files from the IFS to a externally defined files using CPYFRMIMPF. Of course, you'll need to build the target files with DDS or SQL. Then you can sort them as needed. Then use CMPPFM (Compare Physical File Member). Normally used to compare source code, but I have a CL utility that does compare two files two see what changed since the previous month. Good Luck. I also like the idea above using "Beyond Compare".
Comment
Comment