Hi everybody,
I have the following problem and I hope a smart guy can help me , because I have nothing found in the web...
I have a select statement, like in the following example. Depending on the case I call a procedure, which has general statements and case-specific ones. This procedure is called in every case. I do not want to devide this proc in many procs, but I like to to something like call proc !! 'E1' for case 1, call proc !! 'E2' for case two and so on, how you can see in the procSUN example. The reason is that if there is a case E3 and E4 in future I have to expand the select statements and not the "under procs"..
I hope my examples were understandable.
Do you know a smart solution to convert a string to a procedure or variable?
Select-Statements:
select (E);
when (E1)
Vaiable= 'E1';
call ProcSUN;
when (E2)
Vaiable= 'E2';
call ProcSUN;
otherwise action-n;
end;
ProcSun procedure
ProcSUN:
...general Statements...
call proc !! Variable
end ProcSUN