× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Paul (and Jon)

You would think that. The really tough part is that there is a subprocedure that executes this code and about 95% of the code is exactly the same between the 5250 and the CGI implementations. The data is read by the exact same subprocedures and when I look at the data its exactly the same before the call. It is just that when the call to the external program is made AND the host and port passed happen to be offline, the call from the 5250 program returns "Offline" the CGIDEV2 program hangs (debug shows it is stopped at the call itself).

I'll check to see if I am current on PTF's because this is just too strange to be a coding issue. It seems to be the environment that the code is executing in. The only difference between the CGIDEV2 and 5250 programs in terms of program creation is that the CGIDEV2 program is compiled as a module and then the CRTPGM command is used to create the program vs creating the 5250 program with CRTSQLRPGI. Maybe that program stack difference is the source of the problem...

Pete Helgren
Value Added Software, Inc
www.asaap.com
www.opensource4i.com


On 6/23/2011 5:14 AM, Paul Nicolay wrote:
Peter,

This prototype has nothing to do with it... it's the code inside CHK_PORT that is probably hanging ?

Provide a program stack, see on which function it hangs... and check that code.

Kind regards,
Paul

________________________________________
From: rpg400-l-bounces@xxxxxxxxxxxx [rpg400-l-bounces@xxxxxxxxxxxx] on behalf of Pete Helgren [pete@xxxxxxxxxx]
Sent: Thursday, June 23, 2011 06:15
To: RPG programming on the IBM i / System i
Subject: Re: Differing results calling same program from different environments

Still can't sort it out. Procedure prototype is:

D Check_Port PR ExtPgm('CHK_PORT')
D p_host 32A
D p_port 6A
D p_status 1A

and I call it:

check_port(DSPHOST: DSPPORT: host_status );

In the 5250 RPG program all calls, even to offline hosts, return
correctly. In the CGIDEV2 (with same prototype and same call, same
data) the offline host hangs the program call and eventually times out.

Very, very weird. I recompiled the CHK_PORT program with activation
group *CALLER but it made no difference.

Stumpted...

Pete Helgren
Value Added Software, Inc
www.asaap.com
www.opensource4i.com


On 6/22/2011 12:44 PM, Pete Helgren wrote:
Probably best to post the whole thing (as ugly as it is):

http://code.midrange.com/0d0cc7098e.html

Pete Helgren
Value Added Software, Inc
www.asaap.com
www.opensource4i.com


On 6/22/2011 12:25 PM, Nathan Andelin wrote:
I don't see a "return" statement in your "else" block. How would the program end?

-Nathan


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.