Consultor Eletrônico



Kbase P84655: Does Progress 4GL have a File Comparison Function?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/10/2004
Status: Unverified

GOAL:

Does Progress 4GL have a File Comparison Function?

GOAL:

Is there a File Comparison Function in the 4GL?

FIX:

No, Progress 4GL does not have a File Comparison Function. In order to compare the contents of two files, use an OS File Comparison Utility such as the well-known diff utility found on UNIX Systems. On Windows, there is also a tool named WinDiff whose job is to compare the differences between the contents of two files. Following is an example of how to call the UNIX diff utility from within a Progress 4GL program:

OS-COMMAND VALUE("diff old-sports.st sports.st > difference.txt":U).
FILE-INFO:FILE-NAME = "difference.txt":U.
IF FILE-INFO:FILE-SIZE > 0 THEN
MESSAGE "The files differ in content!"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ELSE
MESSAGE "The files are identical!"
VIEW-AS ALERT-BOX INFO BUTTONS OK.