public String app() {
    if (d1 < 0) {
      // No stack or detail is present
      return asg.length() > 0 ? asg : null;
    } else if (d1 == 0) {
      // Application portion is empty
      return null;
    } else {
      // Application is present along with stack, detail, or sequence
      return substr(asg, 0, d1);
    }
  }
public String app ( ) { if ( d1 < 0 ) { return asg . length ( ) > 0 ? asg : null ; } else if ( d1 == 0 ) { return null ; } else { return substr ( asg , 0 , d1 ) ; } }
Return the application for the server group or null if invalid.