Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. ClassMethod ProjectLength(Mask As %String = "%Package%")
  2. {
  3. Set count = 0
  4. Set rset = ##class(%SQL.Statement).%ExecDirect(,"SELECT Name FROM %Dictionary.ClassDefinition WHERE NOT Name %STARTSWITH '%sqlcq' AND Name LIKE ?", Mask)
  5.  
  6. While rset.%Next() {
  7. Set class = rset.%Get("Name")
  8. Do ##class(%Compiler.UDL.TextServices).GetTextAsArray(, class, .raw)
  9. Set lines = $ORDER(raw($CHAR(0)), -1)
  10. Write class, $JUSTIFY("", 40-$LENGTH(class)), $JUSTIFY(lines, 7), !
  11. Set count = count + lines
  12. }
  13. Write "Total ", $JUSTIFY("", 34), $JUSTIFY(count, 7)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement