readln not advancing to next record with counter variable %thisLineNbr%. I have verified that %thisLineNbr% is incrementing in each loop. It only reads line 3091. If change startingLineNbr to 3092, it reads the next line.
The readln code is:
Let>startingLineNbr=3091
Let>endingLineNbr=3100
Let>thisLineNbr=%startingLineNbr%
While %thisLineNbr%<=%endingLineNbr%
ReadLn>C:\\\inetdirs\\\NetSoft\\\MyVector\\\WebStorm\\\form\\\pifferTmp.soy,%thisLineNbr%,strLine
add>%thisLineNbr%,1
EndWhile
readln not advancing with counter in while loop
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: readln not advancing with counter in while loop
When assigning a variable never use the % symbols otherwise you are actually assigning the value to a variable named after the VALUE of the variable. %..% means value of. You don't want to assign to the value of you want to assign to the variable itself. Your While also needs a chevron. Here's what you need:
Note instead of the Add command you could do:
Let>thisLineNbr=thisLineNbr+1
Code: Select all
Let>startingLineNbr=3091
Let>endingLineNbr=3100
Let>thisLineNbr=%startingLineNbr%
While>thisLineNbr<=endingLineNbr
ReadLn>C:\inetdirs\NetSoft\MyVector\WebStorm\form\pifferTmp.soy,%thisLineNbr%,strLine
Add>thisLineNbr,1
EndWhile
Let>thisLineNbr=thisLineNbr+1
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?