EXPAND: PROC(STRING,COMPRESS_CHAR); /* THIS ROUTINE DECOMPRESSES A STRING BY EXPANDING PATTERNS OF COMPRESSION CHARACTERS DETECTED WHEN A COMPRESSION CHARACTER FOLLOWED BY A COUNT IS FOUND. */ DCL STRING CHAR(*) VARYING; DCL (I,J,K,LENGTH_STRING) FIXED BINARY(31); DCL (COMPRESS_CHAR,TEST_CHAR) CHAR(1); DCL OUT_STRING CHAR(LENGTH(STRING)*2) BASED(P); DCL P POINTER; ALLOC OUT_STRING SET(P); LENGTH_STRING=LENGTH(STRING); I=1; J=1; DO WHILE(I<=LENGTH_STRING); TEST_CHAR=SUBSTR(STRING,I,1); IF TEST_CHAR=COMPRESS_CHAR & I