BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I want to pull a subset of a db2 query and place in a sas dataset. Then run a second query against that output and some other db2 tables. I consistantly get the message in the second query that the sas dataset is a 'undefined file'.
I've been told by unreliable sources that I CAN'T reference a sas dataset in subsequent queries because the FROM statement in Pass-Thru doesn't 'know' about sas.....is this true? if so, any idea of how I can create a 'hold' space of my own in db2 to store my data in a table (rather than a sas dataset) for use across queries?
3 REPLIES 3
darrylovia
Quartz | Level 8
You could store the query in a DB2 temporary table. See the SAS/ACCESS documention on temporary table support for DB2.

We have Oracle where I am and I use temporary table feature occationally.

-Darryl
deleted_user
Not applicable
Thank you, unfortunately i get a security access error saying I'm not allowed to create a table....(sigh)...thanks much anyway...
MattC
Calcite | Level 5
Check with your DBA to see if they have a separate schema on your database that allows temporary tables from users.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 1127 views
  • 0 likes
  • 3 in conversation