Skip to content

Instantly share code, notes, and snippets.

@FleXoft
Last active November 28, 2018 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FleXoft/4662942c295c1f1214d91f2abefc3a18 to your computer and use it in GitHub Desktop.
Save FleXoft/4662942c295c1f1214d91f2abefc3a18 to your computer and use it in GitHub Desktop.
HPE Service Manager
function countTABLE( table, query ) {
var fTABLE = new SCFile( table, SCFILE_READONLY );
var rc = fTABLE.doSelect( query );
if ( rc == RC_SUCCESS ) {
do {
print(fTABLE.id+ "_"+fTABLE.name);
} while ( fTABLE.getNext() == RC_SUCCESS )
}
rc = fTABLE.doCount( query );
return rc;
}
print ( "COUNT: [" + countTABLE( "types", true ) + "]");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment