×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Not sure what you mean by timestamp fields,
but my experience is CMPPFM mainly compares
the "value" of each row/record, and I have
found it useful for quick/easy compares where
the record length limit is not an issue .

Also consider SQL: look for recent posts on
midrange for using SQL to compare two files.


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of A Paul
Sent: Saturday, July 20, 2013 9:58 AM
To: Midrange Systems Technical Discussion
Subject: Re: Flat file comparision

I believe CMPPFM display that two files are different(even if two files are identical in terms of contents of the files) if it finds differences in timestamp fields.  My vendor sends a file everyday and it does not have date in it, I am only looking to compare the content of the files and if both are identical throw an alert.  I don't think CMPPFM may work.
 

________________________________
From: Gary Thompson <gthompson@xxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Sent: Saturday, 20 July 2013, 10:18
Subject: RE: Flat file comparision


Have you tried command: CMPPFM ?
It was developed specifically for Source files like QCLSRC, etc
Works on any file with record length less than something like 120 ?

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of A Paul
Sent: Saturday, July 20, 2013 7:08 AM
To: Midrange Systems Technical Discussion
Subject: Flat file comparision

Below is my code
 
       IF         COND(Z10_A = 'ADMFILE' & Z10_B = &LIB) THEN(DO)
   ALCOBJ     OBJ((Z10_B/Z10_A *FILE *EXCL)) WAIT(500)
   MONMSG     MSGID(CPF1002 CPF1085) EXEC(GOTO CMDLBL(RETRY))
   CALL       PGM(ADMPGMC)
   CLRPFM     FILE(&LIB/ADM.FILE)
   MONMSG     MSGID(CPF3142) EXEC(CRTPF FILE(&LIB/ADM.FILE)
   CPYF       FROMFILE(&LIB/ADMFILE) TOFILE(&LIB/ADM.FILE) MBROPT(*REPLACE)
   COMMANDC   P1(ADM.FILE) P2(&LIB)
   DLTF       FILE(&LIB/ADMFILE)
   ENDDO

I receive a flat file by name ADMFILE into AS/400, This flat file does not contain any date in it. I apply the contents of the file(to my in house files) by calling an internal program. I copy the contents of the file into another file (flat file in our system contain dot)and delete it.
 
What I am trying to do is compare the file as soon as it received  with previous day file and  if both are same  send an email alert ( if both are different dont do anything and go to next step) and if the file is not received by certain time send an email alert.
I am looking for AS/400 utility(or if any code) that does the job and also open for suggestions to change my existing code. I need to keep check for the file for an hour time and send an alert as well.
 
Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.