Tuesday, November 2, 2010

Temenos T24 Infobasic Command LOCATE

LOCATE statement is used to locate the position of a string or determine the position to insert in to maintain a specific sequence.

Syntax

LOCATE expr IN dynamic.array,STARTPOS
BY sort.expr SETTING variable
THEN statements ELSE statements

Additional Information

Sort.Expr :

AL -> Ascending left(Alpha sort)
AR -> Ascending right(Numeric sort)
DL -> Descending left(High-low alpha sort)
DR -> Descending right(High-low numeric sort)

Example

DAYS = "MON:"FM:"TUE":FM:"WED":FM:"THU":FM:"FRI"
LOCATE "WED" IN DAYS SETTING FOUND ELSE FOUND = 0
CRT "Position of WED in DAYS dynamic array :":FOUND
LOCATE "SAT" IN DAYS BY "AL" SETTING POS ELSE 
 INS "SAT" BEFORE DAYS
END
CRT "Position where SAT has been inserted :":POS
CRT "Days dynamic array after inserting SAT :":DAYS

Output

Position of WED in DAYS dynamic array : 3
Position where SAT has been inserted : 2
Days dynamic array after inserting SAT : MON||SAT||TUE||WED||THU||FRI

0 comments:

Post a Comment

 

Blog Info

A Pakistani Website by Originative Systems

Total Pageviews

Tutorial Jinni Copyright © 2015 WoodMag is Modified by Originative Systems