From:	CSBVAX::MRGATE!V2002A%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU@SMTP 15-DEC-1987 21:37
To:	ARISIA::EVERHART
Subj:	RE: Disassembling DCLTABLES.EXE


Received: from CUNYVM.CUNY.EDU by KL.SRI.COM with TCP; Tue 15 Dec 87 12:20:06-PST
Received: from TEMPLEVM.BITNET by CUNYVM.CUNY.EDU ; Tue, 15 Dec 87 15:19:58 EST
Date:      15 DEC 87 03:15 EST
From:      V2002A%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU
To:        INFO-VAX@SRI.COM
Subject: RE: Disassembling DCLTABLES.EXE

Hi,

      The following BASIC program will convert any file into a
format readable by EDT.  On RSTS you can also edit and rewrite the
file (including executable images, form libraries and data dictionaries),
but I haven't had time to get the rewrite function to work on VMS:-(
      Once you 'TSKEDT' dcltables.exe, look at it with edt and you'll
see all sorts of abbreviated commands clustered together in one area.
I already tried it...  Cheers!

   Andy Wing   V2002A%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU

****************** CUT HERE *************
1 REM
2 REM
3 REM     TSKEDT - CAN MAKE ANY RSTS OR VMS FILE
4 REM
5 REM
6 REM
10 ON ERROR GOTO ERRTINE
20 CLS$=CHR$(155%)+"[2J"
30 PRINT CLS$+CHR$(155%)+"[0;0f"
40 DIM CX%(255%)
42 CX%(I%)=I% FOR I%=0% TO 255%
45 CHANGE CX% TO NONULL$
50 PRINT "---------------------------- ______."
100 INPUT "ENTER FILE NAME TO CONVERT ";FID$
105 PRINT "----------------___"
110 INPUT "ENTER FILE EXTENSION";EXT$
115 PRINT
120 FID1$=FID$+"."+EXT$
200 OPEN FID1$ AS FILE #1%    &
       VIRTUAL                &
       ACCESS MODIFY          &
       MAP TSKREC
210 MAP (TSKREC) TBLOCK$=512%
220 FID2$=FID$+".ISK"
230 OPEN FID2$ AS FILE #2%    &
      SEQUENTIAL VARIABLE     &
      MAP ISKREC
240 MAP (ISKREC) IBLOCK$=32%
300 INPUT "PRE-EDIT - 1, POST-EDIT - 2 EXIT - E";P9$
310 IF P9$="1" THEN GOTO PRE_EDIT
320 IF P9$="2" THEN GOTO POST_EDIT
330 IF P9$="E" THEN GOTO BAIL
340 PRINT "TRY AGAIN" \ PRINT \ GOTO 300
2900 PRE_EDIT:
       X$=""
3000 GET #1%
3010 FOR I%=0% TO 15%
3040 START%=I%*32%+1%
3070 X$=MID$(TBLOCK$,START%,32%)
3100 IBLOCK$=X$
3110 PUT #2%
3115 NEXT I%
3120 GOTO 3000
3130 GOTO BAIL
3200 POST_EDIT:
      X$=""
      X1$=""
3250 FOR I%=1% TO 16%
3260 GET #2%
3280 X1$=X1$+IBLOCK$
3290 NEXT I%
3300 MOVE TO #1%, X1$
3310 PUT #1%
3330 GOTO POST_EDIT
3340 INPUT "KILL EDT FILE?";P9$
3345 IF P9$="Y" THEN
        KILL FID2$
     END IF
3350 GOTO BAIL
31000 ERRTINE:
IF (ERR=5% AND (ERL=200 OR ERL=230)) THEN
        PRINT "CAN'T FIND FILE `";FID$;"'"
        PRINT
        RESUME 100
     END IF
31100 IF (ERR=11% AND ERL=3000) THEN RESUME 3130
31110 IF (ERR=11% AND ERL=3260) THEN RESUME 3340
31120 IF ERR=28% THEN
        PRINT
        RESUME 32750
      END IF
31130 IF (ERR=157% AND ERL=3310) THEN GOTO BOMB
31900 PRINT "OTHER ERROR #";ERR;"IN LINE #";ERL \ GOTO BAIL
32000 BOMB:
        PRINT
        PRINT "CONVERTED FILE IS CORRUPTED!"+BEL
        PRINT "TASK IMAGE DESTROYED"
32750 BAIL:
        ON ERROR GOTO 0
        CLOSE #1%, #2%
32760 END

(ORIGINALLY WRITTEN IN PDP-11 BASIC+2/RSTS V9.2)

