Substring Expressions

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Substring Expressions

Post by htuser »

Dear all,
I'm trying to use the substring expression in preproc to advance in a nth character in a alpha(20) item.
for exemple, i would like that operators change only the 00i in the event where only 00i is incremented in the abdbfg00i string.
If the abdbfg001 is already write the operator in a previous item (such as CODE1(i)), i write this code:

PROC CODAGE
Preproc
numeric i;
if CODE1(i) <>"" then CODAGE(i)=CODE1(i) and
advance to CODAGE[length (CODAGE)7:1];//the first character after the abdbfg string in the alpha (20) item.
else reenter CODE1(i);
endif;

or

PROC CODAGE
Preproc
numeric i
Preproc
if CODE1(i) <>"" then CODAGE(i)=CODE1(i) and
advance to CODAGE[7:1];//the first character after the abdbfg string in the alpha (20) item.
else next;
endif;

but unfortunately, the compiler send:" Expecting ';' or operator near line 2 in CODAGE procedure"
Thanks in advance for answers,
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Substring Expressions

Post by Gregory Martin »

There is no way to tell CSEntry to start data entry at a certain position in the field. Your best option is to add subitems to this alpha(20) item. One of the subitems will contain the value that you want the keyer to enter, and that subitem is what you'll add to your form.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Substring Expressions

Post by htuser »

Thanks.
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply