думаю будет полезна всем
SET echo off feedback off pagesize 0 linesize 1000;
prompt **********************************************************************************************************************;
prompt *** Список пользователей блокирующих расчет товародвижения *********************************************;
prompt **********************************************************************************************************************;
prompt **********************************************************************************************************************;
SELECT substr(SUPERMAG.SSLOCKS.SID,1,8),
substr(SUPERMAG.SSLOCKS.OBJTYPE,1,3),
substr(SUPERMAG.SUPERMAG_SESSIONS.MACHINE,1,11),
substr(SUPERMAG.SUPERMAG_SESSIONS.TERMINAL,1,10), substr(SUPERMAG.SSOBJECTTYPES.TYPENAME,1,20),
substr(SUPERMAG.SSLOCKS.ID,1,15)
FROM SUPERMAG.SSLOCKS,
SUPERMAG.SUPERMAG_SESSIONS,
SUPERMAG.SSOBJECTTYPES
WHERE SUPERMAG.SSLOCKS.OBJTYPE!='CP'
and SUPERMAG.SSLOCKS.SID = SUPERMAG.SUPERMAG_SESSIONS.SID
and SUPERMAG.SSLOCKS.OBJTYPE = SUPERMAG.SSOBJECTTYPES.OBJTYPE;
prompt **********************************************************************************************************************;