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.