Category : Paradox DBMS
Archive   : PX2WP51B.ZIP
Filename : PX2WP5.SC

 
Output of file : PX2WP5.SC contained in archive : PX2WP51B.ZIP
;*************************************************************************
; Script Listing
; Date : 02/11/91
; Time : 11:04:57 pm
;
; System : PX2WP5
; File Name : e:\mrgprog\px2wp5.sc
; By : Jonathan Goldman
; Last modified 04/23/91 9:54:34 pm
; Copyright (c) 1991 Jonathan Goldman
; Revision 1.1: Modified to fix bug with WP 5.0
; Modified to handle no tables in directory
;
;*************************************************************************

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\000"
eor.a = "\5\000"

MENU
{TOOLS} {INFO} {STRUCTURE}
SELECT tablname.a
@20,5
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,5
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 5
TEXT




Paradox to WordPerfect Conversion

The selected file will be converted to a WordPerfect 5.0 or 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
IF tablname.a = "None" THEN
MESSAGE "No tables found"
SLEEP 2000
RETURN
ENDIF
outfil.a = (tablname.a+".sf")
@20,5
?? tablname.a," will be converted to the WP 5.0 or 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


  3 Responses to “Category : Paradox DBMS
Archive   : PX2WP51B.ZIP
Filename : PX2WP5.SC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/