verify data file

20 pts.
Hi everyone! I've a CL program that copies a spool file into a PF file. Is there any way to compare both files, in order to assure they have the same information? Thanx in advance :) Meli

Answer Wiki

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

If I’m reading your question correctly, you’re trying to detect differences between a physical file created from a spool file against another physical file created from another spool file?

the command, CMPPFM (Compare Physical File Member) does just that. I’ve not used the command in a CL, but I’ve used it many times from the command line to detect differences (or confirm sameness). One thing to watch for:
If your reports contain a run-time or date in the headings, those will likely be detected as differences, so you might want to strip out the records that contain those elements before running the compare.

Hope this helps.
— Michael

Discuss This Question: 2  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.
  • MelissaG
    Hi! MichaelKinNH, I tried to implement what you've told me, and it didn't work. What I'm trying to do is to compare the PF against the spool file it was created from. I'm doing this 'cause I want to make sure everything's OK (the information in both files, the PF and the spool file, is the same). I don't know if there's a way to do this. If so, please let me know. Thanx to all. Meli
    20 pointsBadges:
  • TomLiotta
    There is no point in comparing a PF with a spooled file. The only reasonable way to compare a spooled file with anything is to use the spooled file APIs to resolve the spooled file into a user space and process the space. When you process the space, you'll be doing the work that the CPYFRMSPLF command did to get the spooled file into the PF in the first place. If your programming doesn't process in the same way as the command, you won't get a match. And if you can work out enough detail to get a match, there's no point in using CPYFRMSPLF in the first place. You could use your own programming instead. And if you did that, exactly what would you be comparing? Tom
    125,585 pointsBadges:

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.

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


Share this item with your network: