Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cobol and Internet-Explorer 2

Status
Not open for further replies.

landei

Programmer
Apr 28, 2005
20
DE
In one of my programs is a call for the internet-explorer 5.0. The call includes the interface for the internet-page to call. It is the page for "UPS-Tracking". I have find out, that the interface of my IE-5.0 is max. 256 characters. This is the content of the call-command:

03 system-command-line-ie.
05 my-browser pic x(45) value
'"C:\Programme\Internet Explorer\iexplore.exe"'.
05 filler pic x(01) value space.
05 filler pic x(50) value
" 05 filler pic x(50) value
"uest?TypeOfInquiryNumber=T&tracknums_displayed=5&H".
05 filler pic x(50) value
"TMLVersion=5.0&loc=de_DE&error_carried=true&Reques".
05 filler pic x(27) value
"ter=UPSHome&InquiryNumber1=".
05 filler pic xx value "1Z".
05 tu22-kdnr pic 9(6).
05 tu22-code pic 99.
05 tu22-lfdnr pic 9(8).
05 filler pic x(30) value
"&AgreeToTermsAndConditions=yes".

It dont run on the PC of my customer, because the interface of the IE-5.0 there is only 80 characters and the command will be cut off. Did somebody knows, why there is a difference between the internet-explorer and what can i do?

Thanks for help.

Helmut from germany
 
A DOS command line is what has the 256 length limit. I am not sure what the length of the parameter that may be passed to IE 5.0 is. However if you have established conclusively that your customer can only pass 80 then as I see it you have 2 options.

Try upgrading your customer to IE 6 and see if it works then
OR
Make a preliminary call to a website that you control using no parameters and then redirect to the real UPS page that you want.

Clive
 
In general, this approach to invoking the browser is not a very good one as it's not robust:

1. What if IE is installed elsewhere?
2. What if the program is run on a US English (or other language) machine?
3. What if the user prefers Firefox or Opera?

You might try using the START command to invoke the user's default browser, e.g.:

start "
Regards.

Glenn
 
O sorry, there is a mistake!!!
Both version (my version an the version of my customer) of Explorer ist IE 6 not IE 5.

@ clive
the length of the first filler ist 50 Bytes not 49 Bytes. It looks a little bit shorter, but it isnt.
Yes there is a varible in the parameter (the UPS-package-number). It is never the same page I want to call. My Internet-Explorer allways call the right page with a parameter-length of 256 Byte, no problem. The PC of my customer will be cut at 80 Byte.
@ Glenn
The start-command will bring an error during compiling. My compiler ist ACUCOBOL. I know the start-command for file-handling not for start other programs.

Helmut
 
The following runs a browser window in a language and installation independent fashion using AcuCOBOL 5.2 on my Windows XP SP2 system with FireFox:

Code:
identification division.
program-id.  test.
data division.
working-storage section.
01  ws-start.
 05  pic x(128) value "start [URL unfurl="true"]HTTP://WWW.CNN.COM".[/URL]

01  WS-FLAGS PIC 9(8) BINARY VALUE 64.

01  WS-EXIT-STATUS PIC 9(8) BINARY.
procedure division.
0000.
     CALL "C$SYSTEM" USING WS-START 
                           WS-FLAGS
                 GIVING WS-EXIT-STATUS
     STOP RUN
     .

Regards.

Glenn
 
Hi Clive,

many thanks for the helpfull massage. It works !!!

Greatings Helmut
 
Hi Glenn,

many thanks for the helpfull massage. It also works !!!

Greatings Helmut
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top