The other code that I posted was just part of the whole procedure. Bellow is a complete procedure. Would you please help me identify the business rules from this code. What do I look for and where. I have not programmed in Progress before as a result I am finding it difficult to identify the business rules in this particular code. I need guidance on what to look for. Thanks.
LoadFile Procedure
PROCEDURE LoadFile :
/*------------------------------------------------------------------------------
Purpose:
Parameters: <none>
Notes:
------------------------------------------------------------------------------*/
def var vString as char no-undo.
def var vCode as char no-undo.
def var vValue as char no-undo.
def var vSeqNo as int no-undo init 0.
def var vLog as logical no-undo.
pF-Message:Screen-Value = "Loading file " + pOrderFile.
vFileName = pInputDir + pOrderFile.
vLog = session:set-wait-state ("wait").
input stream t_input from value(vFileName) no-echo.
repeat:
import stream t_input unformatted vString.
vString = REPLACE(vString,"|":U,"-":U).
process events.
if entry(1, vString,"=") = vString then
do:
assign vCode = ""
vValue = vString.
end.
else
do:
assign vCode = entry(1, vString, "=")
vValue = trim(substring(vString, index(vString, '=')
+ 1)).
end.
create tEfile.
assign tEFile.SeqNo = vSeqNo + 1
tEfile.Tag = vCode
tEfile.TagValue = vValue.
vSeqNo = vSeqNo + 1.
end.
input stream t_input close.
input close.
vSeqNo = 0.
vLog = session:set-wait-state ("").
END PROCEDURE.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&ENDIF
&IF DEFINED(EXCLUDE-LoadNotes) = 0 &THEN
LoadFile Procedure
PROCEDURE LoadFile :
/*------------------------------------------------------------------------------
Purpose:
Parameters: <none>
Notes:
------------------------------------------------------------------------------*/
def var vString as char no-undo.
def var vCode as char no-undo.
def var vValue as char no-undo.
def var vSeqNo as int no-undo init 0.
def var vLog as logical no-undo.
pF-Message:Screen-Value = "Loading file " + pOrderFile.
vFileName = pInputDir + pOrderFile.
vLog = session:set-wait-state ("wait").
input stream t_input from value(vFileName) no-echo.
repeat:
import stream t_input unformatted vString.
vString = REPLACE(vString,"|":U,"-":U).
process events.
if entry(1, vString,"=") = vString then
do:
assign vCode = ""
vValue = vString.
end.
else
do:
assign vCode = entry(1, vString, "=")
vValue = trim(substring(vString, index(vString, '=')
+ 1)).
end.
create tEfile.
assign tEFile.SeqNo = vSeqNo + 1
tEfile.Tag = vCode
tEfile.TagValue = vValue.
vSeqNo = vSeqNo + 1.
end.
input stream t_input close.
input close.
vSeqNo = 0.
vLog = session:set-wait-state ("").
END PROCEDURE.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&ENDIF
&IF DEFINED(EXCLUDE-LoadNotes) = 0 &THEN