Pioux
New Member
Hi everyone,
I would like to load in a memptr a big text file (more than 3 GB) and then manage the content (I'm using OpenEdge v10).
If I do the following, I get a runtime error because the SET-SIZE statement only work with INTEGER data-type and the value of the variable is too big to fit in an INTEGER.
How can I do to use a INT64 instead an INTEGER to set a size to my MEMPTR ?
I would like to load in a memptr a big text file (more than 3 GB) and then manage the content (I'm using OpenEdge v10).
If I do the following, I get a runtime error because the SET-SIZE statement only work with INTEGER data-type and the value of the variable is too big to fit in an INTEGER.
Code:
DEFINE VARIABLE mm-g-file-binary AS MEMPTR NO-UNDO.
DEFINE VARIABLE mc-g-source-file AS CHARACTER NO-UNDO.
DEFINE VARIABLE mi-g-source-size AS INT64 NO-UNDO.
DEFINE STREAM mst-import.
ASSIGN
mc-g-source-file = fin-source-file:SCREEN-VALUE
FILE-INFO:FILE-NAME = mc-g-source-file
mi-g-source-size = FILE-INFO:FILE-SIZE.
SET-SIZE(mm-g-file-binary) = mi-g-source-size.
INPUT STREAM mst-import FROM VALUE(mc-g-source-file) BINARY NO-MAP NO-CONVERT.
IMPORT STREAM mst-import mm-g-file-binary.
INPUT STREAM mst-import CLOSE.
How can I do to use a INT64 instead an INTEGER to set a size to my MEMPTR ?