If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Need an expert instruction on how to view db2 logs on AS400. This is for the re-engineering of rpg report functionality using java. Not being familiar with rpg, I need those logs to see how rpg accesses the database, which tables, etc.
Not sure what you mean by "logs". Are you trying to see what records are being changed by the RPG program? Does the RPG program access the data via SQL or by native read/chain? If it is by SQL you could use the Print SQL Information (PRTSQLINF) command - this will list how the data is accessed via SQL - can be useful.
Thank you for a prompt reply. By logs I mean a log file, which contains all the sql statements run against the database. Mostly I am interested in select statements, but it will be handy in other areas also.
Those rpg programs access data thru read/chain. I will submit an rpg job and then look in the log to figure out what tables rpg accessed to collect the data.
If the RPG programs access the tables via native READ/CHAIN etc then there is no magic command to see the SQL statments used. During compile time there isn't even a precompile listing like you would get from an SQL RPG program. Do you have access to the source to the RPG program? If you wanted to see what files were accessed by the program use the command Display Program References (DSPPGMREF) - prompt on the command and choose to list *FILEs - then you will see what PF and LF files are accessed - along with display / report files etc.