Table of Content
HAL Forum
function Boolean ObjIncluded (
string CheckSeq,string ComparsionSeq)
Description:
Performs a check to determine if all elements in one string value sequence are part of another string value sequence
Parameters:
CheckSeq String value sequence to check
ComparsionSeq String value sequence to use as a comparsion master
external function Boolean ObjIncluded(string,string);

procedure Add3Objs(var string objstr,string nobjstr,string accnumber,Boolean checkf)
BEGIN
  Integer pos,errcode;
  string 255 ostr,errstr;
  string 255 tmpobjstr;
  
  tmpobjstr = objstr;
  pos = 0;
  ExtractObj(nobjstr,pos,ostr);
  while (nonblank(ostr)) begin
    if (ObjIncluded(ostr,objstr)==false) then begin
      if (nonblank(tmpobjstr)) then begin
        tmpobjstr = tmpobjstr & ",";
      end;  
      tmpobjstr = tmpobjstr & ostr;
      if (checkf) then begin
        errcode = CheckObjs(accnumber,tmpobjstr,errstr);
      end;
      if (errcode==0) then begin
        if (len(ostr)+len(objstr)>=59) then begin goto L19; end;
        if (nonblank(objstr)) then begin
          objstr = objstr & ",";
        end;  
        objstr = objstr & ostr;
      end;
    end;
    ExtractObj(nobjstr,pos,ostr);
  end;
L19:;
  RETURN;
END;
Related topics:
««