added LSL2 stored procedures
This commit is contained in:
45
LSL2/STPROC/REMOVE_RDS_OVR.txt
Normal file
45
LSL2/STPROC/REMOVE_RDS_OVR.txt
Normal file
@ -0,0 +1,45 @@
|
||||
compile function remove_rds_ovr()
|
||||
begin condition
|
||||
pre:
|
||||
post:
|
||||
end condition
|
||||
$insert logical
|
||||
$insert rlist_equates
|
||||
$insert msg_equates
|
||||
$insert rds_equ
|
||||
declare function utility, msg
|
||||
|
||||
open 'RDS' TO RdsTable else
|
||||
Void = msg( '', 'Unable to open RDS...' )
|
||||
return 0
|
||||
end
|
||||
*Void = utility( 'CURSOR', 'H' )
|
||||
Stmt = 'SELECT RDS WITH WAFERS_SCHEDULED_OVR <> ""'
|
||||
rlist( Stmt, target_activelist$, '', '', '' )
|
||||
if @reccount then
|
||||
NoLockRds = ''
|
||||
Eof = false$
|
||||
loop
|
||||
readnext @id else Eof = true$
|
||||
until Eof
|
||||
lock RdsTable, @id then
|
||||
writev '' on RdsTable, @id, rds_wafers_scheduled_ovr$ else
|
||||
Void = msg( '', 'Unable to write to RDS ':@id )
|
||||
return 0
|
||||
end
|
||||
unlock RdsTable, @id else
|
||||
Void = msg( '', 'Unable to unlock RDS ':@id )
|
||||
return 0
|
||||
end
|
||||
end else
|
||||
NoLockRds := @id:', '
|
||||
end
|
||||
repeat
|
||||
if NoLockRds then
|
||||
NoLockRds[-2,2] = '.'
|
||||
Mtext = 'Unable to lock the following RDS will have to manually remove wafers_shceduled_ovr or try later...':NoLockRds
|
||||
Void = msg( '', Mtext )
|
||||
end
|
||||
end
|
||||
*Void = utility( 'CURSOR', 'A' )
|
||||
return 0
|
Reference in New Issue
Block a user