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

53
LSL2/STPROC/MODS_PREP.txt Normal file
View File

@ -0,0 +1,53 @@
function mods_prep()
$insert logical
$insert rlist_equates
$insert msg_equates
declare function utility, msg, mods_load_control
Stmt = 'SELECT MODS BY APP BY TABLE BY ROW BY UPDATE_TYPE BY-DSND MOD_DATE BY-DSND MOD_TIME'
Stat = utility( 'CURSOR', 'H' )
rlist( Stmt, target_activelist$, '', '', '' )
Stat = utility( 'CURSOR', 'A' )
if @reccount then
Stat = utility( 'CURSOR', 'H' )
open 'MODS' to ModsTable else
Void = msg( '', 'Unable to open MODS...' )
return 0
end
PrevID = ''
CurID = ''
RemIDs = ''
Eof = false$
loop
readnext Id else Eof = true$
until eof
CurID = field( Id, '`', 1, 3 ) ;* FIRST THREE PARTS ARE: APP*TABLE*ROW
CurID:= field( Id, '`', 6, 1 ) ;* LAST PART IS THE MODE
if CurId = PrevId then
* DELETE
delete ModsTable, Id else
Void = msg( '', 'Unable to delete MODS ':Id )
return 0
end
end else
* DIFFERENT MOD
PrevId = CurID
end
repeat
Stat = utility( 'CURSOR', 'A' )
void = mods_load_control()
end else
MsgInfo = ''
MsgInfo<mtext$> = 'There are no rows in the MODS table.'
MsgInfo<micon$> = '!'
Void = msg( '', MsgInfo )
return 0
end
return 0