verify data file
20 pts.
0
Q:
verify data file
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
ASKED: Dec 19 2005  7:24 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
0 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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
Last Answered: Dec 21 2005  8:17 AM GMT by MichaelKinNH   0 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

MelissaG   20 pts.  |   Dec 21 2005  9:40AM GMT

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

 

TomLiotta   8025 pts.  |   Nov 22 2009  12:49PM GMT

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

 
0