added LSL2 stored procedures

This commit is contained in:
Infineon\StieberD
2024-03-25 14:46:21 -07:00
parent 09f1a66046
commit c667dd56eb
1655 changed files with 527967 additions and 0 deletions

View File

@ -0,0 +1,29 @@
compile subroutine record_lock( TableVar, TableName, Row )
$insert logical
declare subroutine msg
declare function send_info
Tries = 0
Locked = false$
LOOP
LOCK TableVar, Row THEN
Locked = true$
END ELSE
Tries += 1
END
UNTIL Locked OR Tries >= 500
REPEAT
IF NOT(Locked) THEN
IF STATUS() THEN
ErrMsg = "Record ":Row:" in File ":TableName:" is locked by your station"
END ELSE
ErrMsg = "Record ":Row:" in File ":TableName:" is locked by another station"
END
MSG(ErrMsg)
END
RETURN