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

Hi, 

 

I recently got an issue and trying to figure out the best way for a work around.

 

Here's sample of my code

 


Data cash_flow;
set cash_flow
(rename= (FLOW_T_1-FLOW_T_&nb_s=FLOW_POS_1-FLOW_POS_&nb_s ));

array FLOW_POS_ {&nb_s} $ FLOW_POS_1-FLOW_POS_&nb_s;
array FLOW_PERFO_ {&nb_s} $ FLOW_PERFO_1-FLOW_PERFO_&nb_s;
do i = 1 to &nb_s;
FLOW_PERFO_[i] = FLOW_POS_[i];
end;

run;

 

FLOW_POS_[i] will return these vales in numeric format

-123456789 -123456789 -123456789 -123456789 -123456789

 

FLOW_PERFO_[i] will return these values in character format

-1234E8 -1234E8 -1234E8 -1234E8 -1234E8

 

I need both in numeric. Any insight would be appreciated, thanks !

1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @KBou 

In your array statements, both arrays are defined as character ($).

What is the type of input variables: FLOW_T_xxx and FLOW_PERFO_xxx ?

Could you please run a proc contents for example?

View solution in original post

2 REPLIES 2
ed_sas_member
Meteorite | Level 14

Hi @KBou 

In your array statements, both arrays are defined as character ($).

What is the type of input variables: FLOW_T_xxx and FLOW_PERFO_xxx ?

Could you please run a proc contents for example?

KBou
Fluorite | Level 6

Oh wow, i feel dumb. Didn't even saw that.

 

Ty sir

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 602 views
  • 0 likes
  • 2 in conversation