Hi there,
I apologize for my ignorance, I'm still learning iSeries/AS400. I'm trying to programmatically retrieve PFRDATA from the QAPM* database files (QAPMSYSTEM, QAPMDISK, QAPMSYSCPU, QAPMJOBOS, etc.) remotely, and I am using odbc to query these. I understand that when I query these tables I always get results from the *FIRST member. My question is, how do I always make sure I query the *LAST member in the database files?
I cannot create an ALIAS unless I first know the exact member name, (I tried using *LAST when creating an alias and didn't work).
I tried using OVRDBF FILE(SOMEFILE) TOFILE(QPFRDATA.QAPMDISK) MBR (*LAST) but that does not work either once it recycles at midnight and creates a new member. I still get the same member from the first time I executed OVRDBF even when running the OVRDBF CL command again.
I know this is about SQL and touches some CL, my goal is to be able to always query the last member of the custom perf data (R00000****) member in the QAPM* tables using just SQL but if I have to run some CL commands before I can do that, that's also fine.
Your help is much appreciated.
Thanks!
I apologize for my ignorance, I'm still learning iSeries/AS400. I'm trying to programmatically retrieve PFRDATA from the QAPM* database files (QAPMSYSTEM, QAPMDISK, QAPMSYSCPU, QAPMJOBOS, etc.) remotely, and I am using odbc to query these. I understand that when I query these tables I always get results from the *FIRST member. My question is, how do I always make sure I query the *LAST member in the database files?
I cannot create an ALIAS unless I first know the exact member name, (I tried using *LAST when creating an alias and didn't work).
I tried using OVRDBF FILE(SOMEFILE) TOFILE(QPFRDATA.QAPMDISK) MBR (*LAST) but that does not work either once it recycles at midnight and creates a new member. I still get the same member from the first time I executed OVRDBF even when running the OVRDBF CL command again.
I know this is about SQL and touches some CL, my goal is to be able to always query the last member of the custom perf data (R00000****) member in the QAPM* tables using just SQL but if I have to run some CL commands before I can do that, that's also fine.
Your help is much appreciated.
Thanks!
Comment