How to merge 420 tables into one table using a loop

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

Posts: 19
Joined: Fri Nov 03, 2017 7:30 pm

How to merge 420 tables into one table using a loop

Postby sudesh » Wed Jan 17, 2018 5:38 pm

Hi, I'm trying to merge 420 tables data into one table by using for tableA.copyrange A2 N23 tableALL A2

I would like to do a loop that changes tableA from table(1) to table(j) and that changes the destination in tableALL by A(j*24)

Any help will be greatly appreciated.

My code:

string type = "r rs rl tr trs trl"
string list_eq = "eq1a eq2a eq3a eq4a eq5a eq6a eq7a eq8a eq9a eq10a eq11a eq12a eq13a eq14a eq15a eq1b eq2b eq3b eq4b eq5b eq6b eq7b eq8b eq9b eq10b eq11b eq12b eq13b eq14b eq15b mav10 pppm gsd agr_a agr_b agr_c"
string curlist = "CAD USD"
string certain = "US CN EK UK JP CH AU NZ NW SD"

table tableALL

tableALL(1,1) = "Position"
tableALL(1,2) = "Modèle"
tableALL(1,3) = "Devise"
tableALL(1,4) = "Ratio"

for %i {certain}


for %i {certain}

if @isobject("signal_cad_"+%x+"_"+%i)=1 then
tableALL(1,!b) = %i


for %a {type}
for %x {list_eq}
for %j {curlist}

tableT_{%a}_{%x}_{%j}.copyrange A1 N23 tableALL A1



Return to “Programming”

Who is online

Users browsing this forum: No registered users and 10 guests