S
Screll
Guest
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:
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 "Stack Overflow - Where Developers Learn, Share, & Build Careers".
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...
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 "Stack Overflow - Where Developers Learn, Share, & Build Careers".
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...