-2

I was given a task to build a program using progress 4gl to export a log file which should have all the details such as File name processed, completion time taken for read and write.

Is there anyway capture all these information? Please let me know and provide sample query to execute from my end. It helps a lot

Bharat
  • 177
  • 7

1 Answers1

1

A simple way is to use either TIME or ETIME depending on what kind of precision you need.

For precision in whole seconds:

DEFINE VARIABLE iStart AS INTEGER NO-UNDO.
DEFINE VARIABLE iEnd   AS INTEGER NO-UNDO.

iStart = TIME.

/* Do something. Using pause to simulate. Use spacebar to break pause */
PAUSE 10.

iEnd = TIME.

MESSAGE "It took" iEnd - iStart "seconds".

For precision in milliseconds:

ETIME(TRUE).

/* Do something. Using pause to simulate. Use spacebar to break pause */
PAUSE 10.

MESSAGE "It took" ETIME "milliseconds".

You can also look at MTIME for a solution like the first but with milliseconds instead of seconds.

Jensd
  • 7,886
  • 2
  • 28
  • 37