× 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: user open file with a variable not a constant
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Fri, 27 Aug 1999 11:20:34 -0600

Wayne,

What are you trying to accomplish?  There are several ways to do this but 
it is hard to make a recommendation without understanding the problem.  
The first way is to use an override and with an externally described file.  In 
this case you will need to know the format of the file opened and defined in 
your program match.  Second, you could use the same technique with a 
program described file.  This is pretty simple.  Third, you could use the 
C file I/O functions and call them from within an RPGIV program.  And finally, 
you could use embedded SQL.  With SQL you have two choices.  One is to 
read the data into a data area that is defined at compile time.  This is the 
simplest.  The other option is to define an SQLDA in your application, you 
can then open any file, get information about the file and read records 
directly into your input area.

David Morris

>>> "Wayne Achenbaum" <wache@slomins.com> 08/27/99 07:56AM >>>
Hello all, I'm new to this list. I have an Rpgxxx question. Does anyone know
a way to user open a file in rpg with the file name not in quotes, but in a
variable? Thanks in advance

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