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.

 
Go Back  dBforums > Database Server Software > DB2 > Create a view db2 log on as400

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-25-05, 14:57
rkha rkha is offline
Registered User
 
Join Date: Feb 2005
Posts: 3
Create a view db2 log on as400

Hi:

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.

Thank you.
Reply With Quote
  #2 (permalink)  
Old 02-25-05, 15:04
jsdba jsdba is offline
Registered User
 
Join Date: Sep 2004
Posts: 12
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.
Reply With Quote
  #3 (permalink)  
Old 02-25-05, 15:27
rkha rkha is offline
Registered User
 
Join Date: Feb 2005
Posts: 3
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.
Reply With Quote
  #4 (permalink)  
Old 02-25-05, 15:37
jsdba jsdba is offline
Registered User
 
Join Date: Sep 2004
Posts: 12
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.
Reply With Quote
  #5 (permalink)  
Old 02-25-05, 16:10
rkha rkha is offline
Registered User
 
Join Date: Feb 2005
Posts: 3
Ok, will look for another solution. Thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On