BookmarkSubscribeRSS Feed
glmsas
Calcite | Level 5

I'm using access to see these db2 tables, but they get updated or tables get added and i'd like to search the library ref by table name and update date.

Is this something proc contents will do? or something else?

I've got 9.12 on the PC running

thanks

gary

1 REPLY 1
SASJedi
Ammonite | Level 13

You might try reading the DB2 dictionary tables with explicit SQL passthrough.  The code would look something like this (at the minimum, the items in CAPS will need to be modified):

proc sql;
   connect to db2(database=MYDB);
   select * from connection to db2
      (select tabschema
              , tabname
              , create_time
              , stats_time
         from syscat.tables
         where tabschema = 'SCHEMA_NAME'
         order by typename);
   disconnect from db2;
quit;
Check out my Jedi SAS Tricks for SAS Users

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1001 views
  • 0 likes
  • 2 in conversation