Kbase P159139: How to export all the obtainable fields of a specific record which reports the error SYSTEM ERROR: b
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  27/01/2010 |
|
Status: Unverified
GOAL:
How to export all the obtainable fields of a record which reports the error SYSTEM ERROR: bffld: nxtfld: scan past last field. (16)?
GOAL:
How to export each field of a record as an individual value into an output file?
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
Create a procedure named master.p with the following contents:
/* begin master.p */
DEFINE VARIABLE thetablename AS CHARACTER NO-UNDO.
DEFINE VARIABLE therecid AS RECID NO-UNDO.
UPDATE thetablename FORMAT "x(60)" LABEL "Table Name"
therecid FORMAT ">>>>>>>>>>>>>>>>>>>>>>9" LABEL "Recid" WITH SIDE-LABELS.
FOR EACH _file WHERE _file-name = thetablename,
EACH _field OF _file BY _order.
RUN fieldvalue.p _file._file-name _field._field-name therecid.
END.
/* end master.p */
Create a procedure named fieldvalue.p in the same directory as master.p with the following contents:
/* begin fieldvalue.p. */
OUTPUT TO "fieldvalue.txt" APPEND.
FOR EACH {1} WHERE RECID({1})={3}.
PUT UNFORMATTED "{2}: " {1}.{2} SKIP.
END.
OUTPUT CLOSE.
/* end fieldvalue.p */
When the procedure master.p is run it will prompt the user for the table name and recid reported in the error (16).
It will create an output file named fieldvalue.txt in the directory the procedures are run from.