def disable_journal():
"""
Disables logging in CICS (except for system logs)
"""
number_journals = 0;
all_journals = 0;
em.move_to(1,2)
req_set_jour = CEMT+" S JOURNAL ALL DIS"
em.safe_send(format_request(req_set_jour))
em.send_enter()
data = em.screen_get()
for d in data:
if "Jou(" in d and "NORMAL" in d and "Dis" in d and "DFHLOG" not in d:
number_journals +=1;
all_journals += 1;
elif "Jou(" in d and "NORMAL" not in d and "Ena" in d and "DFHLOG" not in d:
pos= d.find("Jou(") + len("Jou(")
whine("Journal "+d[pos:pos+8]+" could not be disabled",'err')
all_journals += 1;
if number_journals > 0:
whine(str(number_journals)+" of "+str(all_journals) +" journals were disabled",'good')
else:
whine("Only DFHLOG is defined, cannot disable this system log",'err')
评论列表
文章目录