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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 432 views
  • 0 likes
  • 2 in conversation