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
On Jun 4, 2021, at 5:29 AM, Johan Liebenberg <joha...@gmail.com> wrote:
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/64144341-a743-4e2b-9824-8cfda8f609f9n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/df6af11c-1987-4d92-a718-8e87378be89cn%40googlegroups.com.
Thanks for the reply.Yes as I said, it works just fine on Linux. I am trying to send some data to another server, just a few headers with values. The code does not need to check status as it should not interrupt the current process if it fails for any reason whatsoever.
I will pick it up on the remote server if the process did not call in successfully. Anyway, taking the exact code out of the gosub fixed it. Same code, just no gosub and no return. Works fine on Linux, does not work on Windows.
I will rewrite some of it when I start using the jCurl command. Will have to figure out if it is available on the older versions of jBase.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/1d86ca99-8725-4601-ae4e-2dbf51ea872dn%40googlegroups.com.
On Wed, Jun 9, 2021 at 6:55 PM Johan Liebenberg <joha...@gmail.com> wrote:Thanks for the reply.Yes as I said, it works just fine on Linux. I am trying to send some data to another server, just a few headers with values. The code does not need to check status as it should not interrupt the current process if it fails for any reason whatsoever.I would probably not do this from jBASE at all then, just monitor a transfer directory and write the data to be transferred there and move on. Otherwise your main program will hang around waiting for the curl etc. I don't know if the receiving end is jBASE or something else, but message queues are your friend, or even something as simple as scp. Think in parallel terms.
I will pick it up on the remote server if the process did not call in successfully. Anyway, taking the exact code out of the gosub fixed it. Same code, just no gosub and no return. Works fine on Linux, does not work on Windows.Which is why you should work out what is going on with your subroutine and EXECUTE. You may have found a way to get around it by duplicating code, but that is more likely to be masking the actual problem, which may come back to bite you later.
I will rewrite some of it when I start using the jCurl command. Will have to figure out if it is available on the older versions of jBase.But is using a form of curl really the correct way to do this?
To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/959f9501-c0fb-44e8-8168-800375aa9b2an%40googlegroups.com.