Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
Actually the URL to access the program looks like this:
myhost:3000/
and I would add:
&dept=ABC
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
Although it is posible to pass parameters to a COBOL program .... parameters are one or more arguments that can be passed to the program. These arguments can be accessed through the CHAINING phrase of the Procedure Division header in the compiled program. These parameters are part of the alias for your program, so they are not accessible to be passed via the url.
An alternative is, you could make an alias for each department, and when on your original page, once the dept is selected, each department then executes it's own url, which in turn is linked to an indivual alias. for instance dept1 could be " http://127.0.0.1:3000?hostgw=127.0.0.1&portgw=8009&alias=dept1 " where dept1 is an alias runs your program using parameters of dept1.
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
shjerpe, thanks for the quick and informative answer. That alternative isn't a solution for us: this is a system we sell, and 'department' is not limited to a small set of values. Is there any other way - any devious (or even mischevious) way that variable might be placed somewhere the Cobol program could find it?
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
I put my devious hat on, and unfortunately I don't think so. The url is essentially a way to fire off a COBOL program on the server. Now that server based program can interact with the client (using AcuToWeb desktop). So the original web page could make an environment variable or write a text file on the client. The COBOL program on the server could launch a bat file to read the environment variable or client side text file and then proceed from there. Possible but seems pretty ugly.
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
I agree. Thanks for trying. Does your devious hat have horns?
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
Yes! Great news. Thank you. Is this documented somewhere, to help me fill in the missing pieces -- i.e., exactly how those parameters are specified and how they arrive to the Cobol program? The "s" in runtimeArgs suggests maybe multiple arguments are placed in a single URL variable?
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
I deleted my post ... the runtime args are the -c ,-d any of the things you can do to tell the runtime to do something (start the debugger). None of those options are the arguments (or parameters) you want to pass. Sadly I tested this, and to use paramenters, they have to be part of the alias, and not something in the url. Sorry.
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
Okay, thank you.
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
I have some excellent news. You can pass parameters via the url. The COBOL program needs to use the CHAINING phrase .. PROCEDURE DIVISION chaining lk1, lk2, lk3 set up an alias for the program (i.e dept1), then in the url " " http://127.0.0.1:3000?hostgw=127.0.0.1&portgw=8009&alias=dept1 ABC DEF GHI " so it is the alias followed by value value where the values match how many item you pass to the linkage.
Also, and my apologies for missing this, it is documented, &aliasArgs=<args> will also provide this capability.
&" http://127.0.0.1:3000?hostgw=127.0.0.1&portgw=8009&alias=dept1&aliasArgs= ABC DEF GHI "
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
That really is excellent news! To flash out the example, is it like this:
127.0.0.1:3000/
I opened a support ticket for this issue, requesting this be explored with Development. Are you in communication with support - with Doug Peck? My ticket is #3103644.
Thank you!
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
This system keeps clobbering the URLs I enter, and I don't see it until I post my reply. I will try again with quotes around it.
"127.0.0.1:3000/
and again, omitting the leading portion: hostname:port, hostgw, just the &alias portion and the remainder:
...&alias=lsmenu%Parm1%Parm2
I really want to clarify the syntax.
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
Yes, Doug and I have been working this one.
Is it possible to launch a program via AcuToWeb and pass variables to the program via the URL?
Example: the user is on a web page (HTML CSS, not AcuToWeb) that displays a list of departments. The user clicks on a department. We want to call a Cobol program to display or modify that department. We need to pass the department number to the program via the URL, e.g.:
myhost:3000/&dept=ABC
Thanks.
lsmenu Parm1 Parm2
Yes, Doug and I have been working this one.
I am trying to pass an argument to AcuToWeb with version 10.4.1 using this command:
http://127.0.0.1:3000/?hostgw=127.0.0.1&portgw=08008&alias=unsubscribe&aliasArgs=%20%22DESOTEST%22
the correct program launches for the selected alias, but nothing shows in my CHAINGING variable.
Also, I tried ACCEPT WS-COMMAND-LINE FROM COMMAND-LINE and nothing shows.
Is this the correct format to pass the argument, or does it just not work ?
(PS - I am sending out hundreds of emails, and this is supposed to launch an UNSUBSCRIBE screen so the user can unsubscribe from my emails).