Results 1 to 3 of 3

Thread: Abstracting Business rules from code

  1. #1
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Abstracting Business rules from code

    Can someone help me abstract the business rule from the code bellow. I am not familia with progress codes and having some difficulties identifying the business ruless in this code. Please help me out. Wher can I find it. I need response ASAP. 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

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    What are you talking about? I don't see any human-style rules in there, like a TOS.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Business rules

    Can you make sense off of the above codes. In a simple English can you explain to someone who does not know how to program what the above code is doing. That's what I am looking for. Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •