× 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.



This is what I thought it was initially also, Scott.  But it looks like it
is more of an IFS/C API type issue.  Here is the email that I was just about
to send in response to Bob Cozzi's post.




I have done all my "what about this" type stuff on completely fresh signons
(because of past experiences), so I shouldn't have to do a RCLACTGRP
immediately upon signing on, should I?

I have narrowed it down to when I am working with files in the IFS (open(),
close(), write(), and unlink()).  Does that ring any bells??  I am creating
a file (created successfully) and I then pass the location of that file to
another sub procedure to open it and process it.  The second sub procedure
gets a negative value when it tries to open that file again.  I am going to
output the C API error string as my next step.  I will let everyone know
what I find.

MODIFICATION TO INITIAL POST
I miss typed the part about where I didn't have to specify the program name
on the STRDBG, I _do_ specify the name of the program; I don't know if that
matters or not. . .

Thanks for the post Bob,
Aaron Bartell




-----Original Message-----
From: Scott Klement [mailto:klemscot@xxxxxxxxxxxx]
Sent: Monday, February 17, 2003 2:29 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Works in Debug . . .



I've found that usually when something works in debug, but doesn't work in
real life, it's a timing issue. Running in debug (even without specifying
the
program name or stepping through the source) will cause the program to run a
bit more slowly.

With a sockets program, that can make a big difference because it can be
the difference between data being available and not being available.

The symptoms suggest that your client program is giving up and dropping
the connection in between reading the header and reading the body of the
data...   possibly you're "expecting" data when you shouldn't, and simply
slowing down the program causes more data to be there solving the problem.

That's purely my experience however.  The mistakes you make may be
different from the mistakes that I make :)   If you can post code
snippets, I'll see if I can tell you more...


On Mon, 17 Feb 2003, Bartell, Aaron L. (TC) wrote:

> Well, I couldn't find this in the archives after about 10 minutes of
looking
> so I am going to post it.
>
> I have an RPG program that is doing a GET to an HTTP server (Tomcat) via
> sockets and receives back a response.  When I run it in debug I can see
> everything that is going on, and it works as expected.  When I run it
> outside of debug it doesn't send the same request; it just sends the
header
> of the HTTP request.  I know that it is only sending the header because I
> reviewed the Tomcat logs.
>
> Here is the even weirder part (is weirder a word?). . . all I have to do
is
> a STRDBG without entering a program name or nothing, and then call the
> program in question and it works!!??  Why does it work when I have the
> debugger running but it doesn't work when the debugger is not running?
>
> I have had this problem before and I don't remember how I fixed it or if
we
> just took another route because we couldn't figure it out.
>
> TIA,
> Aaron Bartell

_______________________________________________
This is the RPG programming on the AS400 / iSeries (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 ...


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.