With a routine like this one, you can quickly calculate how many lines of code you are working with. And it is not only for routines, it works for classes because remember that classes generate routines !
Here you have the routine source code:
LinesOfCode ;
new SQLCODE,tRoutine
set tTotalLOC = 0
&sql(DECLARE ROUTINES CURSOR FOR
SELECT NAME
FROM %Library.RoutineIndex
WHERE TYPE = 'MAC'
ORDER BY NAME)
&sql(OPEN ROUTINES)
&sql(FETCH ROUTINES INTO :tRoutine)
while (SQLCODE=0)
{
write !



