def _str_jobid(msg) :
    """Returns (str) job Id from input string.

       E.g. returns '849160' from msg='Job <849160> is submitted to queue <psnehq>.'
    """
    fields = msg.split()
    if len(fields)<2 : return None
    if fields[0] !='Job' : return None
    return fields[1].lstrip('<').rstrip('>')