×
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.
Your DSPF expects indicator 50 to be off in order to display the
subfile. In your RPG, when loading the SFL, you use *IN50 here:
C QTE CHAIN EQXL02 50
I do not see where you force *IN50 = *Off when you determine that you
have records loaded. If the chain fails on the last record, your
subfile will fail to display...
Hth,
-Eric DeLong
-----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 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.