Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: dhrobertsonHi,
I having a problem with a Do While loop. I'm just trying to test the logic so the graph itself may not make much sense but, the issue is, the loop will go round once, and increment the "counter", in this case lineno. it continues and with the loop and outputs as expected, but the 3rd time it goes around where the lineno is now 2.... the node "Determine Next" will not evaluate the lineno as expected and assigns the final value.
in other words:
I have an if statement which increases lineno. it works successfully for 2 passes after which is doesn't evaluate when lineno == "2" and jumps to the final assignment of "5".
what might be happening here? I cant work it out... is something happening in the Do While node which is causing lineno to stop evaluating or am I doing something stupid?
nodes are pasted below... any help appreciated...
thanks
Douglas
node:Static_Data_3
bretype:core::Static Data
editor:sortkey=56bdf60f489f3ca6_2
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
country_code:string,line:string
CA,this is CA1
CA,this is CA2
CA,this is CA3
CA,this is CA4
CA,this is CA5
CA,this is CA6
CA,this is CA7
CA,this is CA8
CA,this is CA9
CA,this is CA9
PT, this is PT1
PT, this is PT2
PT, this is PT3
PT, this is PT4
PT, this is PT5
PT, this is PT6
SE, this is SE1
SE, this is SE2
SE, this is SE3
SE, this is SE4
EOX
editor:XY=1140,660
end:Static_Data_3
node:XRef_5
bretype:core::X-Ref
editor:sortkey=56bdf5d2237f661e_4
input:@45781ca80c2802d0/=Static_Data_3.40fe6c55598828e5
input:@45781ca971fe502f/=States_4.40fe6c55598828e5
output:@45781cad02e051b0/=
output:@457826825d7c2de0/=
output:@4578268450ad5d88/=
prop:LeftInputKey=<<EOX
country_code
EOX
prop:RightInputKey=<<EOX
State
EOX
prop:SortLeftInput=true
prop:SortRightInput=true
editor:XY=1310,660
node:Sort_2
bretype:::Sort
editor:shadow=45782670131b71e8
input:@40fd2c743ebf4304/=
output:@40fd2c746a2a3b47/=
end:Sort_2
node:Bypass_3
bretype:::Bypass
editor:shadow=4578267017753cec
input:@45782010749f0c96/=
input:@457820124fef7658/=
output:@40fd2c7436717256/=
end:Bypass_3
node:Join
bretype:::Join
editor:shadow=457826701862249e
input:@40fd2c745b6d7704/=
input:@40fd2c74504921cd/=
output:@40fd2c7430f76546/=
output:@457826cc03a465f4/=
output:@457826cc510c69e0/=
end:Join
node:Bypass
bretype:::Bypass
editor:shadow=4578267041681261
input:@45782010749f0c96/=
input:@457820124fef7658/=
output:@40fd2c7436717256/=
end:Bypass
node:Sort
bretype:::Sort
editor:shadow=4578267075a60d09
input:@40fd2c743ebf4304/=
output:@40fd2c746a2a3b47/=
end:Sort
end:XRef_5
node:States_4
bretype:core::Static Data
editor:Label=States
editor:sortkey=56bdf60f1dd53337_3
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
lineno:unicode,State
1,CA
EOX
editor:XY=1140,750
end:States_4
node:XRef_2
bretype:core::X-Ref
editor:sortkey=56bdf5d2237f661e_3
input:@45781ca80c2802d0/=Static_Data_3.40fe6c55598828e5
input:@45781ca971fe502f/=XRef_6.457826825d7c2de0
editor:bend=1=1750|850
editor:bend=1=1750|930
editor:bend=1=1260|930
output:@45781cad02e051b0/=
output:@457826825d7c2de0/=
output:@4578268450ad5d88/=
prop:LeftInputKey=<<EOX
country_code
EOX
prop:RightInputKey=<<EOX
State
EOX
prop:SortLeftInput=true
prop:SortRightInput=true
editor:XY=1290,790
node:Sort_2
bretype:::Sort
editor:shadow=45782670131b71e8
input:@40fd2c743ebf4304/=
output:@40fd2c746a2a3b47/=
end:Sort_2
node:Bypass_3
bretype:::Bypass
editor:shadow=4578267017753cec
input:@45782010749f0c96/=
input:@457820124fef7658/=
output:@40fd2c7436717256/=
end:Bypass_3
node:Join
bretype:::Join
editor:shadow=457826701862249e
input:@40fd2c745b6d7704/=
input:@40fd2c74504921cd/=
output:@40fd2c7430f76546/=
output:@457826cc03a465f4/=
output:@457826cc510c69e0/=
end:Join
node:Bypass
bretype:::Bypass
editor:shadow=4578267041681261
input:@45782010749f0c96/=
input:@457820124fef7658/=
output:@40fd2c7436717256/=
end:Bypass
node:Sort
bretype:::Sort
editor:shadow=4578267075a60d09
input:@40fd2c743ebf4304/=
output:@40fd2c746a2a3b47/=
end:Sort
end:XRef_2
node:Do_While_4
bretype:core::Do While
editor:sortkey=56d0287458cc4346
input:@537256b86cbc760c/=XRef_5.457826825d7c2de0
input:@537256ba68710f32/=XRef_2.457826825d7c2de0
output:@537256d866506f43/=
output:@537389af52916f5d/=
prop:WhileScript=<<EOX
emit *
setSuccessReturnCode(101)
EOX
editor:XY=1430,660
node:Bypass
bretype:::Bypass
editor:shadow=5418a18062c250fe
input:@5373907f34d02b95/=
input:@537390b90a07215c/=
output:@40fd2c7436717256/=
end:Bypass
node:Output_BRD_File
bretype:::Output BRD File
editor:shadow=5418a18079a32a59
input:@40fd2c7476600190/=
end:Output_BRD_File
node:BRD_File
bretype:::BRD File
editor:shadow=5418a1804a3b7eb6
output:@40fd2c742cab0bf0/=
end:BRD_File
node:Filter_2
bretype:::Filter
editor:shadow=5418a180664f1c14
input:@40fd2c74167f1ca2/=
output:@40fd2c7420761db6/=
end:Filter_2
node:Static_Data
bretype:::Static Data
editor:shadow=5418a1800209138c
output:@40fe6c55598828e5/=
end:Static_Data
node:Switch
bretype:::Switch
editor:shadow=5418a180494e0bdd
input:@51645e775c5b5fb1/=
input:@51645e7c5d73480d/=
inputattr:@51645e7c5d73480d.type=optional
output:@51645e802b0d6e53/=
end:Switch
node:Agg
bretype:::Agg
editor:shadow=5418a18070a07535
input:@40fd2c7427456e5b/=
output:@40fd2c744c862db0/=
end:Agg
node:Filter
bretype:::Filter
editor:shadow=5420671f12257e11
input:@40fd2c74167f1ca2/=
output:@40fd2c7420761db6/=
end:Filter
end:Do_While_4
node:Determine_next_loop_3
bretype:core::Filter
editor:Label=Determine next loop
editor:sortkey=56bdf60f1ac70cc5_2
input:@40fd2c74167f1ca2/=Do_While_4.537389af52916f5d
output:@40fd2c7420761db6/=
inclock:/=Append_Excel
prop:Script=<<EOX
if lineno == "1" then {lineno = "2"}
else
if lineno == "2" then {lineno = "3"}
else
lineno = "5"
override emit lineno.unicode() as lineno
where firstExec
EOX
editor:XY=1530,780
end:Determine_next_loop_3
node:States_5
bretype:core::Static Data
editor:Label=States
editor:sortkey=56bdf60f1dd53337_4
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
lineNo:unicode,State
2,PT
3,SE
EOX
editor:XY=1530,860
end:States_5
node:Append_Excel
bretype:core::Append Excel
editor:sortkey=56d029a163d25952
input:@49e34a5e55c82040/=Do_While_4.537389af52916f5d
prop:DataAppendMethod=Append
prop:ExistingDataPreservation=Preserve All
prop:File=c:\looptext.xls
editor:XY=1660,670
end:Append_Excel
node:XRef_6
bretype:core::X-Ref
editor:sortkey=56bdfa280eb42d29_2
input:@45781ca80c2802d0/=Determine_next_loop_3.40fd2c7420761db6
input:@45781ca971fe502f/=States_5.40fe6c55598828e5
output:@45781cad02e051b0/=
output:@457826825d7c2de0/=
output:@4578268450ad5d88/=
prop:LeftInputKey=<<EOX
lineno
EOX
prop:RightInputKey=<<EOX
lineNo
EOX
prop:SortLeftInput=true
prop:SortRightInput=true
editor:XY=1680,850
node:Sort_2
bretype:::Sort
editor:shadow=45782670131b71e8
input:@40fd2c743ebf4304/=
output:@40fd2c746a2a3b47/=
end:Sort_2
node:Bypass_3
bretype:::Bypass
editor:shadow=4578267017753cec
input:@45782010749f0c96/=
input:@457820124fef7658/=
output:@40fd2c7436717256/=
end:Bypass_3
node:Join
bretype:::Join
editor:shadow=457826701862249e
input:@40fd2c745b6d7704/=
input:@40fd2c74504921cd/=
output:@40fd2c7430f76546/=
output:@457826cc03a465f4/=
output:@457826cc510c69e0/=
end:Join
node:Bypass
bretype:::Bypass
editor:shadow=4578267041681261
input:@45782010749f0c96/=
input:@457820124fef7658/=
output:@40fd2c7436717256/=
end:Bypass
node:Sort
bretype:::Sort
editor:shadow=4578267075a60d09
input:@40fd2c743ebf4304/=
output:@40fd2c746a2a3b47/=
end:Sort
end:XRef_6