jBASE 5.2.31 on Windows Server 2012. 

Yes thanks I saw the jCURL command and I will investigate in future to do a 
switch over. Anyway, I got the batch file thing to work by not calling the 
subroutine and instead calling the same code in 3 different places. More 
cleanup to do later.

Thanks :)

On Friday, June 4, 2021 at 11:37:37 PM UTC+10 pfalson wrote:

> What version of jBASE are you using? We support curl natively now 
>
>
> https://docs.zumasys.com/jbase/miscellaneous/jcurl/#additional-helper-functions
>
> Sent from my iPhone
>
> On Jun 4, 2021, at 5:29 AM, Johan Liebenberg <[email protected]> wrote:
>
> 
>
> 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 [email protected]
> To unsubscribe, send email to [email protected]
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/64144341-a743-4e2b-9824-8cfda8f609f9n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jbase/64144341-a743-4e2b-9824-8cfda8f609f9n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/df6af11c-1987-4d92-a718-8e87378be89cn%40googlegroups.com.

Reply via email to