In a job object under the documentation tab the following fields below get defined. when a job abends we have a script that queries these fields and will open a problem ticket and alert the appropriate teams. One of the fields Support_Team_comments is a freeform text. Most job objects only have 1 line, but some job objects have a lot of information (multiple lines) defined
Here is some of the logic in the script that gets invoked when this job abends:
:SET &XMLDOCU# = XML_OPEN(DOCU, &parent_name#, "@Links"):SET &HND# = XML_GET_FIRST_CHILD(&XMLDOCU#):WHILE &HND# <> "": SET &NAME# = XML_GET_NODE_NAME(&HND#): SET &NAME# = STR_UC(&NAME#): SET &TXT# = XML_GET_NODE_TEXT(&HND#)
: IF &NAME# = "SUPPORT_TEAM_COMMENTS": IF STR_LENGTH(&TXT#) > 0: PSET &Support_Team_Comments# = &TXT#
I need a way to determine if the &Support_Team_Comments# variable that got set from reading in the Support_Team_Comments section of the job has multiple lines. I can check the length easily enough, but that doesn't do me any good. I need to know if there are multiple lines in that field.. thanks
Thanks for that idea.. I converted the comment variable to hex in my script. I than do a STR_FIND for '0A'
(which is a new line character). It works great... I can now determine if the variable has multiple lines!
Retrieving data ...