I am not expert about AS400, just know some commands and i exporti some files from AS400 (iSeries) into SQL Server 2005.
Actually i need to know which RPG Program created a file in a library. This because that file contains statistic data from other files stored in other AS400 libraries.
This screenshot show the file STTMVF
in the library DAT_4DWH
(by DSPLIB DAT_4DWH
)
So there are a command that let me know which RPG program created the file STTMVF ?
If yes i need to open the source RPG or CL and try to understand which phisical files are used to compose this statistic file.
Thanks in advance!
You can use journal management or program references to determine what is writing to the file.
Journal management
Starting the journal
To create a basic journal you need to create a journal receiver, a journal, and activate journalling for the file. Replace RECEIVER-LIB, RECEIVER-FILE, JOURNAL-LIB, JOURNAL-FILE, FILE-LIB and FILE with values appropriate for your system.
Dumping the journal
Querying the journal
The field
JOPGM
will contain the program name that inserted, updated, or deleted records from the file.Removing the journal
Program references
Dumping the references
Querying the references
Search the file for all references where the field
WHFNAM
equals FILE. The fieldWHPNAM
will contain the program name. Due to file overrides, etc this method is not as accurate as using a journal.