Recent Activity
Hi,
I am reading through the SAS Specialist Guide book and I am a bit confused about whether or not SAS resets the values in the PDV for each new iteration:
Earlier in the book, it says the variable values in the PDV are reset to missing for each iteration.
Sample code used in book:
data work.update;
set cert.invent;
Total=instock+backord;
SalePrice=(CostPerUnit*0.65)+CostPerUnit;
format CostPerUnit SalePrice dollar6.2;
run;
The variables InStock BackOrd CostPerUnit Total SalePrice are shown in a table with initialized missing values in the book for each starting iteration.
Then the NEXT section in the book has:
When PROC IMPORT reads raw data, SAS sets the value of each variable in the DATA step to missing at the beginning of each cycle of execution, with these exceptions:
variables that are named in a RETAIN statement
variables that are created in a sum statement
automatic variables
In contrast, when reading variables from a SAS data set, SAS sets the values to missing only before the first cycle of execution of the DATA step. Therefore, the variables retain their values until new values become available (for example, through an assignment statement or through the next execution of a SET or MERGE statement). Variables that are created with options in a SET or MERGE statement also retain their values from one cycle of execution to the next.
My questions:
1. In the NEXT section, is it referring to situation for PROC IMPORT? If so, why would you use a PROC IMPORT on a SAS data set? If not, then it contradicts to earlier section in the book.
2. From the book, Variables that are created with options in a SET or MERGE statement, what variables can you create with options other than the in= variables?
3. Can I use the PUTLOG before and after the SET statement to test whether the variables are initialized to missing? Unfortunately for me, I don't have access to SAS. Is there a student version anywhere for people learning SAS?
Thanks!
... View more

0
3
Join this webinar to learn how Large Language Models (LLMs) - ChatGPT, Claude, and DeepSeek, for example - can be seamlessly integrated into the SAS 9.4 environment.
You will learn:
How to call and interact with LLMs using PROC HTTP in SAS.
How SAS Macro Language can be repurposed to dynamically structure prompts and automate AI-driven responses.
Techniques to refine and control LLM responses, ensuring they are relevant and useful for SAS-based workflows.
Register Now
... View more

Labels:
0
0
Join this webinar to learn how to modernize information delivery across your organization.
You will learn:
The experience of accessing SAS content through Microsoft 365.
What it’s like to create new content in SAS® Viya®.
About the wider array of analytics and procedures not available in SAS®9.
The migration process for SAS®9 content included in Microsoft Office documents.
Register Now
... View more

Labels:
0
0
We'll take a look at the multiple pathway options when transitioning from SAS Enterprise Guide to SAS Viya. Plus, get a comparison of SAS Studio features.
You will learn:
What options are available to a SAS Enterprise Guide user transitioning to Viya.
How SAS Enterprise Guide compares to SAS Studio.
About additional benefits gained with SAS Viya.
Register Now
... View more

Labels:
0
0
Want to uplevel your customers' experience? We'll show you a powerful tool to enhance your marketing with deep customer analytics.
You will learn:
How to use the power of personalized web and mobile app experiences to drive conversions.
Best practice approaches to configuring behavior and identity tracking.
Which Customer Intelligence 360 data tables to explore for deeper analysis.
Register Now
... View more

Labels:
0
0
Unanswered topics
These topics from the past 30 days have no replies. Can you help?