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

Hi !

I wanted to add that each item would be assigned date today () in the format date9. run_date name. In SQL, however, it works in 4gl no, how to change it? I get an undeclared array referenced

data WpisyKW;
set tmp_0;
if zab_KW_POZ1='' then zab_KW ='BRAK'; 
if zab_KW_POZ1 ne 'T' then zab_KW ='BRAK'; 
if zab_KW_POZ1 eq 'T' then zab_KW ='AKTYWNY';
today() as Run_Date format date9.;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

Have a closer look at Step-by-Step Programming with Base SAS® 9.4.

 

You need two statements: one assigns the value to the variable run_date, another to attach the format to the variable.

format run_date date9.;
run_date = today();

 

 

EDIT: Link inserted

View solution in original post

1 REPLY 1
andreas_lds
Jade | Level 19

Have a closer look at Step-by-Step Programming with Base SAS® 9.4.

 

You need two statements: one assigns the value to the variable run_date, another to attach the format to the variable.

format run_date date9.;
run_date = today();

 

 

EDIT: Link inserted

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 1 reply
  • 340 views
  • 1 like
  • 2 in conversation