Skip skpSourceObjs = createString() // KEY: 'string' Jkey; DATA: 'Object' Handle Skip skpTargetObjs = createString () // KEY: 'string' Rkey; DATA: 'Object' Handle Object SourceObj = null Object TargetObj = null Module SourceMod = edit("/Example Project 11-27-17/Issues/Example_JIRA_SCRs", false) Module TargetMod = read("/Example Project 11-27-17/EXAMPLE_Requirements/Example Requirements Specification", false) string LinkMod="/Example Project 11-27-17/Example_Links/Example_Issues_to_EXAMPLE_REQS" // get the affected requirements attribute values for the Source Module objects pragma encoding, "UTF-8" pragma runLim, 0 //XFLAGS_ &= ~AutoDeclare_ //May need this to prevent autodeclare from mis-identifying "trim_" variable. string rightTrim(string s) { if (null(s)) return ""; int first = 0; int last = length(s) - 1; while( (last > -1) && (isspace(s[last])) ){ last--; } return(s[first:last]); } string leftTrim(string s) { if (null(s)) return ""; int first = 0; int last = length(s) - 1; while( (isspace(s[first])) && (first < last) ) { first++; } return(s[first:last]); } string trim_(string s) { return(leftTrim(rightTrim(s))); } // End trim_ string linkNextValue(string &s) { string result = "" Regexp hasField = regexp "[ ,;\t\n]*([^,;\t\n]+)[ ,;\t\n]*" while ( (null result) and (! null s) ) { hasField s result = s[match 1] s = s[end(0)+1:] } delete hasField trim_(result) return result }//End linkNextValue for SourceObj in entire (SourceMod) do { if (null(TargetObj)) continue if (isDeleted(TargetObj)) continue string src = SourceObj."affected requirements" if (!null(src)) { put(skpSourceObjs, src, SourceObj) } } for TargetObj in entire (TargetMod) do { if (null(TargetObj)) continue if (isDeleted(TargetObj)) continue string trg = identifier(TargetObj) if (!null(trg)) { put(skpTargetObjs, trg, TargetObj) } } for SourceObj in skpSourceObjs do { TargetObj = null string trgValues = (string (key skpSourceObjs)) string value = null while ( !null trgValues ) { value = linkNextValue(trgValues) if (!null(value)) { if (find(skpTargetObjs, value, TargetObj)) { SourceObj->LinkMod->TargetObj } else { //error numKeysNotFound } } else { //error numKeysNotFound } } } delete(skpSourceObjs) delete(skpTargetObjs)