      SUBROUTINE PLU.BASE64.TO.HEX(SRC,DST)
*PIC-LAN
*
*ALL
*PC
*N
*
*
*
*
*
      OPEN 'BASE64,DECODE' TO DEC.FD ELSE CALL PLXX.STOP(201,'BASE64,DECODE')
*
      DST = ''
      DD = ''
*
      SELECT SRC
      EOF = NO
      LOOP
         READNEXT S ELSE EOF = YES
      UNTIL EOF DO
         IF S <> '' THEN
            D = ''
*
READV T00 FROM DEC.FD , S[1,2] , 1 ELSE T00 = '000'
READV T01 FROM DEC.FD , S[3,2] , 1 ELSE T01 = '000'
READV T02 FROM DEC.FD , S[5,2] , 1 ELSE T02 = '000'
READV T03 FROM DEC.FD , S[7,2] , 1 ELSE T03 = '000'
READV T04 FROM DEC.FD , S[9,2] , 1 ELSE T04 = '000'
READV T05 FROM DEC.FD , S[11,2] , 1 ELSE T05 = '000'
READV T06 FROM DEC.FD , S[13,2] , 1 ELSE T06 = '000'
READV T07 FROM DEC.FD , S[15,2] , 1 ELSE T07 = '000'
READV T08 FROM DEC.FD , S[17,2] , 1 ELSE T08 = '000'
READV T09 FROM DEC.FD , S[19,2] , 1 ELSE T09 = '000'
READV T10 FROM DEC.FD , S[21,2] , 1 ELSE T10 = '000'
READV T11 FROM DEC.FD , S[23,2] , 1 ELSE T11 = '000'
READV T12 FROM DEC.FD , S[25,2] , 1 ELSE T12 = '000'
READV T13 FROM DEC.FD , S[27,2] , 1 ELSE T13 = '000'
READV T14 FROM DEC.FD , S[29,2] , 1 ELSE T14 = '000'
READV T15 FROM DEC.FD , S[31,2] , 1 ELSE T15 = '000'
READV T16 FROM DEC.FD , S[33,2] , 1 ELSE T16 = '000'
READV T17 FROM DEC.FD , S[35,2] , 1 ELSE T17 = '000'
READV T18 FROM DEC.FD , S[37,2] , 1 ELSE T18 = '000'
READV T19 FROM DEC.FD , S[39,2] , 1 ELSE T19 = '000'
READV T20 FROM DEC.FD , S[41,2] , 1 ELSE T20 = '000'
READV T21 FROM DEC.FD , S[43,2] , 1 ELSE T21 = '000'
READV T22 FROM DEC.FD , S[45,2] , 1 ELSE T22 = '000'
READV T23 FROM DEC.FD , S[47,2] , 1 ELSE T23 = '000'
READV T24 FROM DEC.FD , S[49,2] , 1 ELSE T24 = '000'
READV T25 FROM DEC.FD , S[51,2] , 1 ELSE T25 = '000'
READV T26 FROM DEC.FD , S[53,2] , 1 ELSE T26 = '000'
READV T27 FROM DEC.FD , S[55,2] , 1 ELSE T27 = '000'
READV T28 FROM DEC.FD , S[57,2] , 1 ELSE T28 = '000'
READV T29 FROM DEC.FD , S[59,2] , 1 ELSE T29 = '000'
READV T30 FROM DEC.FD , S[61,2] , 1 ELSE T30 = '000'
READV T31 FROM DEC.FD , S[63,2] , 1 ELSE T31 = '000'
*
D = D : T00 : T01 : T02 : T03 : T04 : T05 : T06 : T07 : T08 : T09 : T10 : T11 : T12 : T13 : T14 : T15 : T16 : T17 : T18 : T19 : T20 : T21  : T22 : T23 : T24 : T25 : T26 : T27 : T28 : T29 : T30 : T31
*
         END
         IF LEN(DD) > 4000 THEN
            DST = DST : DD : D
            DD = ''
         END ELSE
            DD = DD : D
         END
      REPEAT
*
      DST = DST : DD
*
      T = LEN(DST)
      IF MOD(T,2) THEN DST = DST[1,T-1]
*
      RETURN
   END
