×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Terri,

The CHAIN in the LOADSF2 subroutine is most likely your culprit. Probably has nothing to do with the number of records (though I can't swear to it since I don't know what QTE is or what EQXL02 is for; besides David has a hissy fit when we swear).

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of THarteau@xxxxxxxxxxxxxxxxxx
Sent: Friday, August 21, 2009 11:41 AM
To: RPG programming on the IBM i / System i
Subject: Re: Subfile Not Displaying Records

Hi,

Here is some of the program code. I know there is some problems with the
SQL (using a logical, and not sure what DESC is), but it is getting the
records, it just takes a while.
FORD345D CF E WORKSTN SFILE(SFLJOB:RRN)
F SFILE(SFLDTL:RRN2)
...
C EXSR ClearSF
C IF Customer <> *ZEROS
C EXSR LoadSF
C ELSE
C EXSR LoadSF2
C ENDIF
C IF *IN75 = *OFF
C WRITE FOOTER1
C WRITE CTLJOB
C EXFMT SCR001
C ELSE
C WRITE FOOTER1
C EXFMT SCR002
C ENDIF
And this is the subroutine that loads the subfile.
C LoadSF2 BEGSR
C*
C EVAL *IN25 = *OFF
C*
C/EXEC SQL DECLARE B CURSOR FOR
C+ SELECT LORD, CLMNDT, LQORD, LNET, LODTE
C+ FROM EQLL01
C+ WHERE LPROD = :Item
C+ ORDER BY LORD DESC
C/END-EXEC
C/EXEC SQL
C+ OPEN B
C/END-EXEC
C* ****
C *IN25 DOUEQ '1'
C*
C/EXEC SQL
C+ FETCH B INTO :QTE, :DAT, :QTY, :NET, :ENTDTE
C/END-EXEC
C*
C IF SQLCOD = 0 AND *IN25 = '0'
C*
C IF DAT = 0
C EVAL DAT = ENTDTE
C ENDIF
C*
C IF DAT >= DAT90
C*
C MOVE DAT DATDS
C EVAL DSPDAT = MONTH + '/' + DAY +
C '/' + YEAR
C*
C QTE CHAIN EQXL02 50
C IF *IN50 = *OFF
C EVAL SBJ = QXSBJ1
C ENDIF
C*
C IF GetsSurch = 'Y'
C EXSR GetSurcharge
C ELSE
C EVAL SurAmount = *ZEROS
C ENDIF
C*
C ILIST IFNE 0
C NET DIV ILIST MODIFR 17 6
C MODIFR MULT 100 MLT
C ELSE
C Z-ADD 0 MLT
C END
C*
C IF (NET + SurAmount) > 0
C EVAL WRKTTL = (ISCST)/
C (NET + SurAmount)
C EVAL WRKPCT = 1 - WRKTTL
C EVAL WRKPC = WRKPCT * 100
C IF WRKPC < 1000 AND WRKPC > -1000
C EVAL (H) PC = WRKPC
C ELSE
C EVAL PC = *ZEROS
C ENDIF
C ELSE
C EVAL PC = *ZEROS
C ENDIF
C*
C EVAL ACT = *ZEROS
C EVAL RRN = RRN + 1
C WRITE SFLJOB
C*
C ENDIF
C*
C ELSE
C EVAL *IN25 = *ON
C ENDIF
C ENDDO
C*
C/EXEC SQL
C+ CLOSE B
C/END-EXEC
C*
C*
C IF RRN = 0
C EVAL *IN75 = *ON
C ELSE
C EVAL RRN = 1
C EVAL *IN75 = *OFF
C ENDIF
C*
C ENDSR



<===================================================>

Terri Harteau
Felker Brothers Corporation
****************
"Do not follow where the path may lead. Go instead where there is no path
and leave a trail."
Ralph Waldo Emerson

****************




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