Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    3

    Unanswered: 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.

  2. #2
    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.

  3. #3
    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.

  4. #4
    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.

  5. #5
    Join Date
    Feb 2005
    Posts
    3
    Ok, will look for another solution. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •