Building a small batch file to run on a Window jBase server. Batch file executes a curl command build inside the jBase program.
I 1st tried to EXECUTE the curl command CAPTURING RESULTS, but the remote server returns an error. I filtered all the illegal character out of the curl command just in case. No luck.This happens to work flawlessly on a Linux server. So the next approach is to create a DOS batch file and execute the batch file with the curl command inside the batch file. Works 1st time but then the trouble starts: So I have a GOSUB RUNCMD that calls the sub below with the curl command inside the CMD variable: RUNCMD: OSDELETE 'temp.bat' EXECUTE 'touch temp.bat' CAPTURING JUNK OSOPEN 'temp.bat' TO TEMPDOSFILE THEN OSBWRITE CMD ON TEMPDOSFILE AT 0 OSCLOSE TEMPDOSFILE EXECUTE 'temp.bat' CAPTURING RESULTS END OSDELETE 'temp.bat' RETURN With the debugger turned on, outside RUNCMD sub, I can follow the progress through the sub line by line, everything works and the remote server receives the curl command correctly and returns the correct data in the RESULTS variable. All good. When the execution gets to the RETURN command, one expects it to jump back to the 1st line after the GOSUB RUNCMD, but instead it jumps back to the RUNCMD: label and it repeats the sub over and over in a loop that you can not break out of. Surely I am very tired because it is late and I am missing something really really obvious. Thanks for looking :) -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to jBASE@googlegroups.com To unsubscribe, send email to jbase-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jBASE?hl=en --- You received this message because you are subscribed to the Google Groups "jBASE" group. To unsubscribe from this group and stop receiving emails from it, send an email to jbase+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/64144341-a743-4e2b-9824-8cfda8f609f9n%40googlegroups.com.