Page 1 of 1

STRPCCMD to run Atrium option

Posted: Wed Dec 03, 2014 5:28 pm
by ppbedz
I have a program that uses STRPCCMD to run an Atrium option from the Iseries. It worked just fine until I added a warehouse parm to the Atrium option definition. I assumed I needed to change the path to include the parm info, as it would not execute without. This is the path that used to work: "http://mcgas400:8080/profoundui/auth/st ... m_item=449"
This is the new path that does not work:
"http://mcgas400:8080/profoundui/auth/st ... p1=L1&l1=2"
Profound issues me a "session has ended" message. I can also see on the browser line that the path does NOT contain the parm information. I ran the process in debug and I can see that the STRPCCMD is executing the correct command string.

I can, however, copy the path into the browser line and it works just fine. Thoughts? Thank you, Patti

Re: STRPCCMD to run Atrium option

Posted: Thu Dec 04, 2014 11:05 am
by Scott Klement
What usually causes a problem with launching a URL via STRPCCMD is how Windows interprets special characters in the URL. Certain characters, such as the & character, have a special meaning in some Windows command interfaces... so this can be problematic.

I tried it this way, and it seemed to work fine for me:

Code: Select all

strpccmd pccmd('rundll32 url,FileProtocolHandler http://plbox:8080/profoundui/auth/start?atrium_item=274&p1=L1&l1=2')
I've found that the FileProtocolHandler usually works well with URLs that have special characters in them. My experience is that launching via 'explorer' often chokes on the = characters in a URL. Launching with 'start' fails with almost any special character (plus opens an ugly DOS window). Launching with ShellExec_RunDLL works nicely on old versions of windows, but fails on new ones. FileProtocolHandler seems to work just about anywhere... the only bad thing is it makes the STRPCCMD longer, so you're more likely to hit the 123 character limit.

Re: STRPCCMD to run Atrium option

Posted: Thu Dec 04, 2014 11:52 am
by ppbedz
Thanks...works perfect!