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


  • Subject: RE: New Opcodes like %EOF
  • From: "Coleman, Katherine" <KColeman@xxxxxxxxx>
  • Date: Wed, 1 Sep 1999 18:53:47 -0400

%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
+---


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.