1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Input-output through stream utilizing memory

Discussão em 'StackOverflow' iniciado por fdantas, Janeiro 21, 2019.

  1. fdantas

    fdantas Administrator Moderador

    help with the following would be appreciated.

    I am trying to run an OS-command in progress using input-output through.

    Case:

    Run command: "echo 'this is a long string'"
    Capture output: "'this is a long string'"


    Issues are:

    • My input string may be greater than the character limit
    • When running directly using through "program" or through value("expression") The input is truncated to ~2500-3000 chars.
    • Entire operation runs fine using files, but want to avoid IO and management.
    • Having trouble attaching my data to the OS-command (utilizing put OR export)

    Could anyone suggest a method to execute a command line, with attached data exceeding 35,000 characters?

    This is what I have tried: (Along with many permutations)

    define variable cLongMsg as character no-undo.
    define variable iLoop as integer no-undo.
    define variable lcResp as longchar no-undo.
    define variable cFileLine as character no-undo.
    define stream logStream.

    input-output stream logStream through "curl".
    /* execute curl -- attach data using put */
    put stream logStream "http://stackoverflow.com".
    put stream logStream CONTROL NULL(0).
    output close.




    read_loop:
    repeat:

    import stream logStream unformatted cFileLine.
    assign lcResp = lcResp + cFileLine.
    end.

    input close.
    input-output close.

    message "[OUT] " + string(lcResp) view-as alert-box.

    Continue reading...

Compartilhe esta Página