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



Questions: does the program use the display file?  If you have a
communications error, a poorly-designed program won't handle a workstation
error properly.  DO you know it's a loop (high CPU) or is the program just
hanging? 

Suggestions: check for Y2K-related date errors, bad/unexpected data, a
problem somewhere else introducing the loop in the suspected program, a
rogue override remaining from a previous job, record locks.  Make sure the
job has maximum logging detail: CHGJOB LOG(4 0 *SECLVL) LOGCLPGM(*YES).  You
should lower the priority of the job as well so you can control it in case
it heads off the reservation.

As a precautionary measure, I'd sign off and sign on before running the job;
this should exclude any garbage left over from previous jobs.

If it loops, do WRKJOB on it and take option 11; you can see the source
statements it's execution.  If there is no I/O activity, it's a program
loop.  You can still have a loop with I/O, of course, and you should be able
to identify it.

There are things you can do in RPG III: add another printer file and
generate an audit log.  Add EXCPT statements throughout the program and
print out values (order number, customer number, indicators, counters, etc.)
and make sure you have at least one in between every GOTO and TAG (no
editorial comments).  It make take a little work to build the code, but this
is a sure-fire way of finding out where the program is misbehaving.  Make
sure your printer file is held and has *NOMAX records.  When/if the job is
looping, you'll see the same entries in the audit log.

When you're ready to tackle ILE, I'd convert the program to ILE RPG (use
CVTRPGSRC), add an "H"  line with OPTION(*NODEBUGIO:*SRCSTMT), compile it in
the *DEFAULT activation group with DBGVIEW(*SOURCE), and wait until it
loops.  Then you can STRSRVJOB and do a remote debug.

-reeve

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
> bounces@xxxxxxxxxxxx] On Behalf Of Willie J. Moore
> Sent: Wednesday, March 17, 2004 12:04 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: RPG program looping when run for PC
> 
> Ladies & Gentlemen / Boys & Girls --
> A little back ground before I ask my questions.  We have an invoicing
> program that has been running since 1998. It was written in RPG III.
> About year ago we installed a PC running Client Access in the department
> that does the invoicing.  Now, at random times the program will go into a
> loop. We never had this problem when we were running it from a 'Green
> Screen" (twinax) terminal.  This problem has happened as offer as a
> couple of times a week or can go months with no problem. If they signoff
> (back to a signon screen) then back on and run the invoicing program, it
> runs fine.  It seems that the more the PC side is used, the more chances
> of the loop happening.
> Questions:
>       1)      Does anyone have any ideals on what might be going on?
>       2)      I have never used the IBM Debug on a program.  Can
> someone help with setting up an IBM Debug on this program when the
> loop happens again.
> 
> Thanks in advance,
> William...
> 
> 
> _______________________________________________
> 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 ...

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.