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



You are right. I also used %EOF recently like this. Hope it'll work fine.

H*
F* File Definitions.
F* Employee Status v/s new Action and Reason code X-ref.
FESCXREFL1 IF   E           k DISK
F* HR transaction.
FHRTRAN    UF   E             DISK
F*
C*-----------------------------------------------------------------------
C
C                   DOW       NOT %EOF(HRTRAN)
C
C                   READ      HRTRAN
C
C                   IF        %EOF
C                   LEAVE
C                   ENDIF
C
C                   SELECT
C
 * For New Hire, Re Hire and Termination, the Employee Status field is
 * processed. Therefore get the X-ref value from the file.
C                   WHEN      HRFUNC = '1' OR HRFUNC = '2' OR HRFUNC = '3'
C     HREMST        CHAIN     ESCXREFL1
C                   IF        %FOUND
C                   EVAL      HREMST = XXACDE
C                   EVAL      HRSALC = XXREAS
C                   ENDIF
C
 * For Rate Change, the default is 'PAY' and 'ARC'
C                   WHEN      HRFUNC = '4'
C                   EVAL      HREMST = 'PAY'
C                   EVAL      HRSALC = 'ARC'
C
 * For Job Change, the default is 'POS' and 'JOB'
C                   WHEN      HRFUNC = '6'
C                   EVAL      HREMST = 'POS'
C                   EVAL      HRSALC = 'JOB'
C
 * For Department, the default is 'DTA' AND 'DEP'.
C                   WHEN      HRFUNC = '7'
C                   WHEN      HRFUNC = '7'
C                   EVAL      HREMST = 'DTA'
C                   EVAL      HRSALC = 'DEP'
C                   EVAL      HREMS1 = 'DTA'
C                   EVAL      HRDEPC = 'DEP'
C
 * For Personnel Data Change, the default value is 'ZZZ'.
C                   WHEN      HRFUNC = '8'
C                   EVAL      HREMST = 'ZZZ'
C                   EVAL      HRSALC = 'ZZZ'
C
C                   ENDSL
C
C                   UPDATE    HRTRANR
C
C                   ENDDO
C
 * End Program.
C                   EVAL      *INLR = '1'
C

Thanks,
Rajeev.





"Coleman, Katherine" <KColeman@kmart.com> on 09/01/99 03:53:47 PM

Please respond to RPG400-L@midrange.com












Subject:  RE: New Opcodes like %EOF




%EOF works for all "read" (C,E,P,PE and WRITE) activities.  There are lots
of "built in functions" in 4.3.  Look in the ILE manual "4.1 (Chapter 20)
Built In Functions".  Maybe we could start a club - "Indicators
Anonymous"!!!

Also you don't have to say =*ON.  Here is a sample from the ILE Manual:

    |

  | |
*...1....+....2....+....3....+....4....+....5....+....6....+....7...+..
  | |
FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords+++++++++++++++++++++++++
  | |    * File INFILE has record format INREC

  | |   FINFILE    IF   E             DISK

  | |
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq
  | |    * Read a record

  | |   C                   READ      INREC

  | |    * If end-of-file was reached ...

  | |   C                   IF        %EOF

  | |   C ...

  | |   C                   ENDIF

    |

    |


+--------------------------------------------------------------------------

Also you can specify a file.  Here is another sample from the manual:


  | |
*...1....+....2....+....3....+....4....+....5....+....6....+....7...+..
  | |
FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords+++++++++++++++++++++++++
  | |    * This program is comparing two files

  | |    *

  | |   FFILE1     IF   E             DISK

  | |   FFILE2     IF   E             DISK

  | |   F

  | |
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq
  | |    * Loop until either FILE1 or FILE2 has reached end-of-file

  | |   C                   DOU       %EOF(FILE1) OR %EOF(FILE2)

  | |    * Read a record from each file and compare the records

  | |    *

  | |   C                   READ      REC1

  | |   C                   READ      REC2

    |

  | |   C                   SELECT

    |

  | |   C                   WHEN      %EOF(FILE1) AND %EOF(FILE2)

  | |    * Both files have reached end-of-file

  | |   C                   EXSR      EndCompare

    |

  | |   C                   WHEN      %EOF(FILE1)

  | |    * FILE1 is shorter than FILE2

  | |   C                   EXSR      F1Short

    |

  | |   C                   WHEN      %EOF(FILE2)

  | |    * FILE2 is shorter than FILE1

  | |   C                   EXSR      F2Short

  | |   C                   OTHER

  | |    * Both files still have records to be compared

  | |   C                   EXSR      CompareRecs

  | |   C                   ENDSL

    |

  | |   C                   ENDDO

    |




-----Original Message-----
From: Brian Stapleton [mailto:brianstapleton@yahoo.com]
Sent: Wednesday, September 01, 1999 4:15 PM
To: RPG400-L@midrange.com
Subject: New Opcodes like %EOF


Greetings;

Does anyone know what the new OP codes are?  Like in V4R3M0 I know that
you can leave the indicators off of a READ and test for Eof using --> IF
%EOF = *ON

Is there one for READE?  What about others?

I think that I like the idea of no  indicators in RPG.

thanks for the help



===
Brian Stapleton
BrianStapleton@yahoo.com

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---






+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.