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



NEW IN V5! USE ILE RPG EXTFILE KEYWORD INSTEAD OF OVRDBF COMMAND
When you want to select which file to open during execution of an ILE RPG
program, you can now use the ExtFile keyword instead of an OvrDbf
command. The following code snippet provides the gist of how this works:

.*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+
FSales UF E K DISK ExtFile( SalesFile )
F UsrOpn
.
.
.
D SalesFile S 21A
.
.
.
C Eval SalesFile = ‘APPDTA/SALES01’
C Open (E) Sales

The ILE RPG Reference manual provides details of the ExtFile keyword. As
with any other F-spec, you specify a file name (e.g., Sales) that is used
within the program. The file you specify must exist when you compile the
program. (Or you can use an OvrDbf command during the program creation
process to reference a different file.) For a typical case, you should
specify a variable (e.g., SalesFile) for the ExtFile argument and the
UsrOpn keyword. Before executing an Open operation, assign the ExtFile
argument a string with the qualified or unqualified name of the file you
want to use. Be sure to use all uppercase for standard OS/400 file names.
The effect in this example is comparable to executing the following command
prior to opening the file:
OvrDbf File( Sales ) ToFile( AppDta/Sales01 )



There’s more! You can also specify the ExtMbr keyword to select which
member to open. The following code snippet provides the gist of using
this keyword:

.*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+
FSales UF E K DISK ExtMbr( SalesMbr )
F UsrOpn
.
.
.
D SalesMbr S 10A


Thank you,

Karen Hodge
Senior System Analyst
Genesys Health System
1000 Healthpark Blvd, Grand Blanc, Mi 48439
Office 810.606.5180, Fax 810.606.7204
khodge@xxxxxxxxxxx


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.