BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Obsidian | Level 7

Hi Community,

I have some records in the output from the following logic that have 'date' in the raw data however appearing in the output as period (.).


What would cause such and can you help me please?

Below is my logic


Data bal_startdate (rename=(Date=StartDate) drop=Offset_Bal);

set Daily;

by AccNo;

if first.AccNo;



Proc Sql;

Create table Day5_bal as

select a.*,


b.offset_Bal, as Day5,



when is missing then 'N' else 'Y' end as Day5_Flag

From bal_startdate a

left join Daily b on a.AccNo=b.AccNo and;



Kind regards,


Accepted Solutions
Obsidian | Level 7

Thanks VDD.


Could you please provide an example on using anydtdte informat in proc sql or data step?


Thanks kindly.

View solution in original post

Super User Tom
Super User

There will note be a variable named DATE in either of the datasets your code is creating.

What variable are you saying has a missing value?

Can you show example data for that ends up with missing value?

Are you sure your "date" variable has integer values? Since you are using exact equality perhaps some of the values are slightly different and just appear the be same when the format is applied?



Obsidian | Level 7

Hi Tom,


Below is an example with the missing date.




Kind regards

Obsidian | Level 7

Thanks VDD.


Could you please provide an example on using anydtdte informat in proc sql or data step?


Thanks kindly.

Super User Tom
Super User

I do not understand what that posted table is trying to represent.


It does not look like what your program is expecting as input data. 

Your original program is expecting a data set named BAL_STARTDATE with multiple dates per value of ACCNO.

Your example data has only one record per ACCNO.


It does not look like what your program appears to be creating as output.  That dataset should have a variable named STARTDATE.



Super User

Take the macro from my second footnote and use it to create a data step with datalines from your dataset "daily". Just a sufficient numer of observations to illustrate your issue. This will take care of any ambiguities, as we can then run your code in exactly the same environment that you ran it.

Posting output listings or copies of the tableview are NOT, I repeat NOT, helpful, as we can only see formatted values, and not the raw values underneath it.

The macro will preserve all values and attributes as they are, which is essential for detecting problems.


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 4 in conversation