SUBROUTINE TRANSP(STR1,DST,DEL) C C This routine takes the first string field (STR1) C and TRANSPoses the first part of the string (ie. to the DELimeter) C with the remaining characters in the string. C If no delimeter is found the string returned (DST) is the same as C the first string (STR1). C Note: The delimeter is removed from DST (the destination string) C C An example: STR1 = DOE, JOHN L. C if DEL = ',' (a comma) C then DST = JOHN L. DOE C IMPLICIT INTEGER (A-Z) BYTE STR1(100),DST(100) BYTE FIRSTS(100),LASTS(100) BYTE DEL(1) C I = IDX(STR1,DEL) IF(I.EQ.0) THEN CALL SCOPY(STR1,DST,LENGTH(STR1)) GO TO 50 ELSE CALL TRUNC(STR1,' ') ! Remove trailing blanks CALL SCOPY(STR1,LASTS,I-1) CALL SCOPY(STR1(I+2),FIRSTS,LENGTH(STR1)-I-1) CALL CONCAT(FIRSTS,' ',DST) CALL APPEND(LASTS,DST) ENDIF 50 RETURN END