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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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