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



Here if the basic code that I use:


     H/TITLE RB140
     H BNDDIR('DLL')
     H OPTION(*SRCSTMT : *NODEBUGIO)
     H EXPROPTS(*RESDECPOS)
     H ACTGRP('QILE')
     H DFTNAME(RB140)
 
'*----------------------------------------------------------------------
-----------
     '*  P R O G R A M   I N F O R M A T I O N
     '*
     '*  Program ID......: RB140
     '*  Program Desc....: NEP Rating
     '*  Author..........: Jon Sinner
     '*  Date............: 06-17-2005
     '*  Request Number..: ??????
     '*  Requested By....: Jon Sinner
 
,*----------------------------------------------------------------------
------------
     '*  M O D I F I C A T I O N S
     '*
     '* Project Programmer Dated Date Description
     '* ------- ---------- ----------
---------------------------------------------------
     '* ??????? JSinner    06-17-2005 Write Original Program
     '*
     '*
 
'*----------------------------------------------------------------------
------------
     '* Files
     '*
     FRATRTCKLR3UF A E           K DISK    USROPN
     '*
 
'*----------------------------------------------------------------------
------------
     '* Array & Table Declarations
     '*
     D AQR             S             80    DIM(10) CTDATA PERRCD(1)

     '*
 
'*----------------------------------------------------------------------
------------
     '* Standalone Variables
     '*
     '*
 
'*----------------------------------------------------------------------
---
     '* Constants
     '*
 
'*----------------------------------------------------------------------
---
     '* External Data Structures
     '*
     '*
 
'*----------------------------------------------------------------------
---
     '* Internal Data Structures
     '*
     '*
 
'*----------------------------------------------------------------------
---
     '*  Local Data Areas
     '*
     '*
     '*
 
'*----------------------------------------------------------------------
---
     '*  External Prototypes
     '*
     '*
 
'*----------------------------------------------------------------------
---
     '*  Internal Prototypes
     '*
     '*
     D QCMD            PR                  EXTPGM('QCMDEXC')
     D  PARMCMD                     500    CONST
     D  PARMLEN                      15P 5 CONST
     '*
     '*
 
'*----------------------------------------------------------------------
---
     '*  Mainline Code
     '*
     '*
     '* Override RATRTCKLR3 file to wait for next record at EOF time
     '*
     C                   CALLP(E)  QCMD(AQR(9):%LEN(%TRIM(AQR(9))))
 

     C                   OPEN(E)   RATRTCKLR3
 

     '*
     C                   DOU       %SHTDN
     C                   READ      RATRTCKLR3
     '*
     '* Instruct Program to shut itself down.
     '*
     C                   IF        RtkCpy = 999 AND RtkOrd = 9999999
     C                   DELETE(E) RTKREC
     C                   EXSR      $EndPgm
     C                   ENDIF
     '*
     '* Instruct Program to shut itself down.
     '*
     C                   IF        $SHTDN
     C                   EXSR      $EndPgm
     C                   ENDIF
     '*
     '*
     '*  calculation code goes here.
     '*
     '*
     '*
     C                   ENDDO
     C*
     C                   EXSR      $EndPgm
     C*
 
*-----------------------------------------------------------------------
--
      *               S U B R O U T I N E S
 
*-----------------------------------------------------------------------
--
 
'*----------------------------------------------------------------------
---
     '*
     '* Subroutine: $ENDPGM - Perform Cleanup and End Program
     '*---------------------------------------------------------
     C     $EndPgm       BEGSR
     '*    -------       -----
     '*
     '* Close all User Controlled Files
     '*
     C                   CLOSE(E)  RATRTCKLR3
     '*
     '*
     '* Delete override on RATRTCKLR3 File
     '*
     C                   CALLP(E)  QCMD(AQR(10):%LEN(%TRIM(AQR(10))))
     C*
     C                   EVAL      *INLR = *ON
     C                   RETURN
     '*
     C     E_EndPgm      Endsr
 

 
'*----------------------------------------------------------------------
---
     '*
     '* Subroutine: *INZSR - Program Initialization
     '*--------------------------------------------
     C     *INZSR        BEGSR
     '*    ------        -----
     C     E_Inzsr       ENDSR
 
'*----------------------------------------------------------------------
---------------
**   AQR
DLYJOB DLY(30)
DLYJOB DLY(5)
OVRDBF FILE(ORDR) WAITRCD(5) OVRSCOPE(*JOB)
OVRDBF FILE(ORDRL) WAITRCD(5) OVRSCOPE(*JOB)
DLTOVR FILE(ORDR)  LVL(*JOB)
DLTOVR FILE(ORDRL) LVL(*JOB)
OVRDBF FILE(ORDRS) WAITRCD(5) OVRSCOPE(*JOB)
DLTOVR FILE(ORDRS) LVL(*JOB)
OVRDBF FILE(RATRTCKLR3) EOFDLY(10) OVRSCOPE(*JOB)
DLTOVR FILE(RATRTCKLR3) LVL(*JOB)






-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mahesh Pawar
Sent: Friday, July 01, 2005 2:57 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: EOFDLY problem


following is my code . Please tell me what is worng in this code. why
the same code does not work if file is empty?. why program does not wait
for eof? Plese adivice me to resolved this issue.
C     *loval        SETLL     L2SNGCHG                                  
C                   READ      L2SNGCHG                               90 
C     *IN90         DOWEQ     *OFF                                      
 * CALL  RSYS106A to create keyword record                              
C                   CALLB     'RSYS106A'                                
C                   PARM                    SCCODE                      
 * UPDATE FLAG                                                          
C                   MOVEL     'X'           SCFLG2                      
C                   UPDATE    RSNGCHG                                   
 * read next record                                                     
C                   READ      L2SNGCHG                               90 
C                   ENDDO                                               
C*                                                                      
C                   SETON                                        LR     
C**********************************************************             

Jon Sinner <JSinner@xxxxxxxx> wrote:Mahesh, I had the same problem. To
resolve the problem, I took the %EOF line. I removed any possible
method(except for the %SHTDN condition) of leaving the loop. 

That fixed the problem and I have not had another problem since.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mahesh Pawar
Sent: Friday, July 01, 2005 12:45 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: EOFDLY problem


Martin If i remove my OVRDBF then whole purpose will go away. 
my program is like driver. it should be active everytime and should wait
for new records entry in file. the program works fine all other
condition but does not work if the file empty at the time of program
execution.(DOW llop works if file is not empty)

Thanks & regards
Mahesh Pawar

Booth Martin wrote:
What happens if you remove the OVRDBF? The program should work ok then. 

Would it help you if your first step was to see if there are records in
the file? The INFDS will tell you if there are records in the file, or
not.

---------------------------------
Booth Martin
http://www.martinvt.com
---------------------------------
-------Original Message-------

From: RPG programming on the AS400 / iSeries
Date: 07/01/05 12:02:33
To: rpg400-l@xxxxxxxxxxxx
Subject: EOFDLY problem

I am using EOFDLY option in OVRDBF of PF and calling RPG program to
process the file. It's works fine whenever there is at least one records
in file. But if my file is empty. Program doesn't wait for new records.



I was using DOWEQ loop for processing the file. So I changed program to
process with DOU loop. Now program is waiting for next record (even the
file empty in beginning) I have added new records to file but program
does not process new records.



Please advice me ASAP. Tommy I hope we can answer my query



Thank in advance



Thanks & Regards

Mahesh Pawar


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
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.


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



---------------------------------
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football

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.