Category : Word Perfect
Archive   : PX2WP.ZIP
Filename : PX2WP51.SC
; Script Listing
; Date : 02/11/91
; Time : 11:04:57 pm
;
; System : PX2WP5
; File Name : e:\mrgprog\px2wp51.sc
; By : Jonathan Goldman
; Last modified 02/11/91 10:54:34 pm
; Copyright (c) 1991 Jonathan Goldman
;*************************************************************************
PROC writefile(tablname.a,outfil.a)
fs.a = "\14\10"
ns.a = "\157"
ne.a = "\156\10"
eon.a = "\18\10\5\12"
eof.a = "\18"
eor.a = "\5"
MENU
{TOOLS} {INFO} {STRUCTURE}
SELECT tablname.a
@20,10
CLEAR EOL
?? "Writing field name information"
PRINT FILE outfil.a fs.a
VIEW "struct"
SCAN
PRINT FILE outfil.a ns.a,[field name],ne.a
ENDSCAN
PRINT FILE outfil.a eon.a
CLEARALL
VIEW tablname.a
n2.n = NFIELDS(tablname.a) + 1
@20,10
CLEAR EOL
??"Writing record: "
SCAN
COPYTOARRAY outrec.r
FOR n1.n FROM 2 TO n2.n
IF TYPE(outrec.r[n1.n]) <> "D"
THEN PRINT FILE outfil.a outrec.r[n1.n],eof.a
ELSE PRINT FILE outfil.a FORMAT("D2",outrec.r[n1.n]),eof.a
ENDIF
ENDFOR
PRINT FILE outfil.a eor.a
@20,30
??recno()
ENDSCAN
ENDPROC
CLEAR
SETMARGIN 10
TEXT
Paradox to WordPerfect Conversion
The selected file will be converted to a WordPerfect 5.1 secondary
merge file. When this is finished, the file may be merged by
selecting it as the secondary merge file. When creating the primary
file, use the actual field name as the field identifier. Dates
will be converted as strings (e.g.: January 5,1991.)
ENDTEXT
SHOWTABLES
DIRECTORY()
"Select file to convert and press Enter"
TO tablname.a
outfil.a = (tablname.a+".sf")
@20,10
?? tablname.a," will be converted to the WP 5.1 merge file: ",outfil.a"."
IF ISFILE(outfil.a)
THEN
MESSAGE outfil.a," already exists."
@22,10
??"Deleting existing ",outfil.a,"."
RUN NOREFRESH "DEL "+outfil.a+" > nul"
@22,10
CLEAR EOL
ENDIF
writefile(tablname.a,outfil.a)
RESET
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/