Author |
Topic  |
|
blt2si
Germany
37 Posts |
Posted - 04/07/2003 : 09:36:50 AM
|
Hello,
I am having trouble with using notations. I have datasets in a worksheet named ss1, ss2, ss3......ss8. And a display column showing the worksheet names. (Column name is "Filename"). If I put in the individual values ss1 the program works but why won't it work with "$(ii)$" which is shown below. Surely the program understands it!
loop (ii,1,8) { %T=Interface!Filename.V$(ii)$; //takes the wks names from columns %A=Mapping; //Wks for graph contours copy -x %T_ZW %A_SS"$(ii)$"; //ZW is dataset from %T //SS1,2,3....8 is datasets from %A copy -a %A_SS"$(ii)$" %A_SSall; //Copy all SS datasets into 1. };
Is there something I am doing wrong??
Thanks
Blank |
|
Mike Buess
USA
3037 Posts |
Posted - 04/07/2003 : 10:30:03 AM
|
Hi Blank,
The '$' symbol is required at the end of this statement...
%T=Interface!Filename.V$(ii)$; // correct as you wrote it
but it does not belong in your copy statements, which should read...
copy -x %T_ZW %A_SS"$(ii)"; -and- copy -a %A_SS"$(ii)" %A_SSall;
I hope that helps.
Mike Buess Origin WebRing Member |
 |
|
blt2si
Germany
37 Posts |
Posted - 04/08/2003 : 03:42:32 AM
|
Hello,
I tried this but still it does not work. I put in:
loop (ii,1,8) { %T=Interface!Filename.V$(ii)$; copy -x %T_ZW %A_SS"$(ii)"; copy -a %A_SS"$(ii)" %A_ZWalle; };
However, to check I simply replaced the "$(ii)" with 1 as follows:
loop (ii,1,8) { %T=Interface!Filename.V$(ii)$; copy -x %T_ZW %A_SS1; copy -a %A_SS1 %A_ZWalle; };
%T is understood. It is not recognising the dataset SS"$(ii)" as SS1, SS2,.....,SS8.
I am stumped with this!
Thanx |
 |
|
Mike Buess
USA
3037 Posts |
Posted - 04/08/2003 : 07:45:47 AM
|
Hi again,
I use that type of notation all the time and can think of no reason why it should fail. However, here are two things you could try...
1. The quotation marks are really unnecessary in this case, so try omitting them... loop (ii,1,8) { %T=Interface!Filename.V$(ii)$; copy -x %T_ZW %A_SS$(ii); copy -a %A_SS$(ii) %A_ZWalle; };
2. Use an intermediate string variable... loop (ii,1,8) { %T=Interface!Filename.V$(ii)$; %I=SS$(ii); copy -x %T_ZW %A_%I; copy -a %A_%I %A_ZWalle; };
Mike Buess Origin WebRing Member |
 |
|
St-Ranger
USA
17 Posts |
Posted - 04/09/2003 : 8:13:28 PM
|
I didn't have time to check this, but it might be somewhat similar to what I described in my problem under the topic "Substition doesn't work in objects/methods.". See marko's response to it. |
 |
|
blt2si
Germany
37 Posts |
Posted - 04/14/2003 : 08:47:17 AM
|
Thanks for that Mike and St-Ranger. It works better with the intermediate string! |
 |
|
|
Topic  |
|
|
|