I run the old code and it generated so many reports.After that I run the new code(or chaged code) it will generate the same number of reports.
Is there any method of comparing the reports in AS400 because if I will start comparing one by one it will take a lot of time.
I agree with CharlieBrown. That is the easiest way to find differences. My question is why is this needed? Is the new code in question not producing a valid report? If the new code was changed to fix a problem or reformatting you will get a lot of differences and it will make your job more difficult.If this is a application written in house I would check with the programmer as to why the request was made and if it was ever verified?
I worked a contract a number of years ago to replace an application (before I learned enough to negotiate better). The biggest problem I had was the acceptance criteria that included verification of parallel runs.
The problem was that the old app reports were wrong in a number of spots. Since it was primarily a monthly process, parallels were trouble. But comparing old to new when the old had errors was a mess.
Be careful when comparing reports.
I probably wouldn't use CPYSPLF and CMPPFM though. I'd probably work up a process using the Qshell catsplf - Concatenate and print spool files utility to capture the outputs and go from there. I might then use the cmp - Compare two files utility to detect differences and note that review is needed.
To report differences, I might use the PASE diff Command. (Use QSH touch - Change file access and modification times to set the file CCSID before running catsplf. CCSID 819 works well.)
Or instead of PASE, I might use WDSC (or RAD or any one of many IDEs) to do the comparison. Whether utilities are used to create a total procedure or an IDE is used for manual comparisons is up to the user.
The various available shells and utilities, combined with streamfile I/O and NetServer, open a lot of possibilities. They should become more widely known and used.
The basic cmp utility isn't so useful unless heavy shell scripting or programming is intended. Other utilities, e.g., diff, give more familiar results. Use of IDE features makes them better understood.
Tom
Tom, Can you explain me how can I capture the output of catsplf? When I tried the command catsplf -j 385091/TXXXXXX/QPADXXXXXX PrtFile 9 I am able to see the report interactively in QShell. But inorder to compare 2 files, I need to capture this to a file, please help me with this.
Can you explain me how can I capture the output of catsplf?
From the documentation for catsplf, the very first sentence:
The catsplf utility reads the specified spool file and writes it to standard output.
That means you can put it wherever you can put standard output. Use shell redirection to a streamfile in whatever directory you choose.
Depending on what you will do with the output, you might want to manage the CCSID of the output streamfile. You'll know when it's time to work on that.
Tom
Tom, thanks, I managed to generate the output as a stream file in my directory and when I ran the cmp command, it showed one line information that there are differences in both the files. Now I want to know what is the difference. For that I tried Diff command, but I am not able to read the data. I think thats what you mentiond by saying I should manage the CCSID. But how to do that?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 6  Replies