Reading Source Members in SQL400
READSRC (Read Source File Member) is an SQL Table Function that accepts the source file library, file name, and member name input parameters and returns the Source Sequence number, Statement Changed Date, and the Source Statement Line itself.
Suppose you want to view the contents of the last source member added to the QRPGLESRC source file. Using READSRC() you would specify the following
select * from table( sqltools.readsrc( 'yourlib', 'qrpglesrc', '*last'))
notes: yourlib (library name). you can use *last, *first, member name.
We have alternate traditional way to access source member by OVRDBF or CREATE ALIAS. But this new way helps user to access the source from anywhere like 5250, RDi, iNavigator etc.
No comments:
Post a Comment