comparing the reports

770 pts.
Tags:
AS/400
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.

Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you copy the spool files to PFs, then you can use CMPPFM to compare the data.

If you print TIME in your headings, be sure to exclude those records from the PFs. those lines will never match. 

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ToddN2000
    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?
    7,935 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • RamvishakRamesh
    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.
    2,505 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • RamvishakRamesh
    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?
    2,505 pointsBadges:
    report
  • TomLiotta
    But how to do that?   Sorry, I just missed your post. You need to learn the Qsell touch utility.  
    qsh cmd('touch -C 819 mysplftxt.spl && +          catsplf -j 543217/myusrprf/myjob MYSPLF 1 >mysplftxt.spl')
      Use the touch utility to create the streamfile before catsplf runs. Set a CCSID like 819 if you want to handle the text as ASCII.   Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following