Alternate method of accessing iexplore.exe w/o STRPCCMD due to string length limitation

Are there any other methods of calling iexplore.exe from the iSeries without using the STRPCCMD.  The string limitation (123 bytes) does not allow the sending of enough parameters.  The call looks something like this:

  '"C:\Program Files\Internet Explorer\IEXPLORE.EXE" HTTP://DEV:89/DEV/P13103/ CC_CNT_ENT.PHP?' +                        
  'cmp=333&usr=xxxxxxxxxx&ssn=xxxxxxxxxx&ord=xxxxxxxxxx&cst=xxxxxxxxx'  


I have posted this question on other iSeries websites and have received no response, please help and be as detailed as possible since I am new to this process.
                     
                   
                           
                     
                         
gmamosesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sriram_PenumathyCommented:
1) Create a file in IFS or QDLS containing the command as .BAT file. please note that the naming convention for this .BAT file should be similar to the PC naming convention.
2) Run this file from STRPCCMD.
0
MurpheyApplication ConsultantCommented:
If you are using Client Access, CA can do this for you.
change the setup of Client Access by menu:
Edit = Preferences = Hotspots =
Now check Execute URL and (if you like) 3-D Button.
and click Ok

Now if you show a HTML in an output field (not input) then you can click it.
you can try to edit a source file and add to it : http://www.google.com.
If you now view this source, this text is changed into a button or clickable link.
If the HTTP:.... text is to long, you can redirect it via your own webserver and put in the text on screen:
Http:www.MyServer.com/AS400_1.HTML or whatever

Regards,
Murph

0
gmamosesAuthor Commented:
I really appreciate the responses; however,  I have a couple of questions

1) In the case of the response from Sriram, I probably did not make myself clear.  If I create a .BAT file in the IFS to house the command, how do I pass the parameters to the command.  They will change based on who the user is and the iSeries session the user is accessing from (multi-session) and the iSeries process the call is coming from.

2) In the case of Murphey, does your solution mean that every Client that tries to execute this command from a green screen has to have Client Access running on their machine.  Also, we have very limited space on the screens so there is not enough room to place a field large enough to hold the command, how would you suggest we handle this.

3) To both, please remember that I am a novice and it would be very beneficial to me if you could provide code demonstrating your solution, i.e. can I create the BAT file in the IFS on the fly?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

daveslaterCommented:
Hi
create a shiortcut to Internext explorer in c:\

ie C:\ixp.lnk

you can then run the command as


STRPCCMD PCCMD('"C:\ixp.lnk HTTP://DEV:89/DEV/P13103/ CC_CNT_ENT.PHP?' +                        
  'cmp=333&usr=xxxxxxxxxx&ssn=xxxxxxxxxx&ord=xxxxxxxxxx&cst=xxxxxxxxx'  
')  

which is with-in the limit

dave
0
MurpheyApplication ConsultantCommented:
Hi gmamoses,

In the case of Sriram, you can write the .BAT file on the moment you need it, eventually you can give the .BAT file the name of the user-ID.BAT, then you dont need to create it per user, but the job will do when a user starts the program.
In case of the Clienat Access solution... yes every user needs CA on his/her computer.

Regard,
Murph
0
gmamosesAuthor Commented:
Thanks daveslater and murphey2, I appreciate both of your comments

1) daveslater, you are correct about shortening the string in some fashion which will work for this project but when one of my associates or I have another project that requires a longer string we will be in the same situation.

2) murphey2, I have not tried your solution regarding the .BAT file but I would like to test it out.  I think since our users can have multiple sessions, I will have to name the BAT file based on the session id instead of the user id.  Can you tell me how to do this from an RPG program or a CL on the iSeries?  
0
tliottaCommented:
gmamoses:

First, if you go Start->Run on your Windows desktop, type [http://www.google.com] for the command and press [enter], what result do you get?

Tom
0
gmamosesAuthor Commented:
In response to tliota I don't know what your point is.  I don't think your response is related to the question or I'm not understanding what your point is.
0
MurpheyApplication ConsultantCommented:
Hi gmamoses,

By typing www.google.com in your run box, you can check if IE is somwhere in your path, in that case you simply can make a command like:
STRPCCMD PCCMD('HTTP://DEV:89/DEV/P13103/ CC_CNT_ENT.PHP?cmp=333&usr=xxxxxxxxxx&ssn=xxxxxxxxxx&ord=xxxxxxxxxx&cst=xxxxxxxxx''  
)  

The .BAT version can be written as file and then copied with the CPY Command.
The CPY command requires a full path of your AS/400 file location e.g.

CPY OBJ('QSYS.LIB/MyLib.Lib/MyFile.File/MyMember.MBR')  
    TODIR('/MyDir')                                    
    TOOBJ(UserID.BAT)                                  

Regards,
Murph
0
tliottaCommented:
gmamoses:

> I don't think your response is related to the question or I'm not understanding what your point is.

Murph has the basic idea in his comment.

I hope the rest this isn't too long, yet still gives you an idea of some of the possibilities.

When I type [http://www.google.com] in the Start->Run input box on any Windows box that I have access to, Internet Explorer (or the default web browser) opens and processes the request.

For me, it wasn't necessary to type ["C:\Program Files\Internet Explorer\IEXPLORE.EXE"] as part of the input. Windows already knows what it's supposed to do with [http:xxxxxxxx]. The protocol is registered along with its handler. In general, that's also true of file extensions -- [c:\download\somedoc.txt] causes Notepad to start up and to open that .txt file.

By taking advantage of Windows capabilities, it becomes possible to significantly shorten the strings that you need to send. The problem changes slightly. Now, the problem becomes "What function do I need to invoke in order to get registered handlers to run?" By going through registered handlers, you automatically have your requests adapt to different configurations.

E.g., what if the C: drive isn't where a program is installed? A request for ["C:\Program Files\Internet Explorer\IEXPLORE.EXE"] would fail. By going through Windows services, the location and program are handled without needing to supply that part of the command string.

There are a few different ways to access Windows services. Rather than giving the path to IEEXPLORE.EXE, see what this does:

 == >  strpccmd  'start http://www.google.com'

Run that from your AS/400 command line to see if it executes on your PC. The Windows START command has a bunch of command-line parameters that help with controlling its actions. You can open a Windows command window and type "help start" to get a basic introduction. You might also review "help cmd". Info on chaining commands together with "&&", redirection and all of the various command shell operators, might spark a bunch of thoughts on how to create a generic procedure to handle many kinds of future needs beyond this single specific one.

For example, you might review:

  http://technet.microsoft.com/en-us/library/bb490816.aspx

You might create a generic 'script' that you'd execute by running cscript and using a redirection or two to get different kinds of results. By chaining commands together, you could assign a mapped drive to a known IFS location that's shared and use that as the basis for your script. The mapped drive assignment might be the first in a series of chained commands. The script could read from a temporary file that you create somewhere else and execute its contents. You could put strings of essentially any length into your own streamfiles.

You find this useful:

  http://technet.microsoft.com/en-us/library/bb490998.aspx

The SET command might run in a script in order to construct an environment variable named "MyEnvVar". The final script command might then be [start %MyEnvVar%]. You could grab strings from lots of places to put togeyther into an environment variable. You could even have your script receive input from a temp file.

You might populate a temp file in the IFS by running some QSH utilities. The temp file might be in the current user's /home directory. You might create a mapped drive assignment on the current user's PC to point to the appropriate /home subdirectory.

Another area to examine might be RunDll32.exe as mentioned in:

  http://www.experts-exchange.com/OS/AS_-_400/Q_23591799.html

That also touches on RUNRMTCMD, which gets around some limitations of STRPCCMD but requires much closer control on the PC side.

Some of my point is that you're looking at how to make Windows do something, but you're asking in an AS/400 topic area (and PHP). Perhaps asking the question in a Windows topic would get some extremely useful results.

I can get Windows to do a lot from our AS/400s, but I'm far from being a Windows expert.

Tom
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gmamosesAuthor Commented:
tliotta, your message might be long but being a novice it is more in line with what I was looking for.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.