Dec 212017
 
DBASE IV Technical newsletter for Aug 89.
File TN8908.ZIP from The Programmer’s Corner in
Category Dbase Source Code
DBASE IV Technical newsletter for Aug 89.
File Name File Size Zip Size Zip Type
COPYTO.TXT 1949 865 deflated
CORRIGE.TXT 321 219 deflated
DIALOG.TXT 5683 2428 deflated
DRAWING.TXT 6731 2687 deflated
DUPES.TXT 4411 1963 deflated
DUPES_S1.TXT 129 104 deflated
DUPES_S2.TXT 119 106 deflated
FANCY.TXT 3145 1493 deflated
INDEXING.TXT 10111 3787 deflated
INDEX_S1.TXT 1135 595 deflated
INDEX_S2.TXT 1246 635 deflated
NEWS.TXT 4605 2026 deflated
NEWS_S1.TXT 535 318 deflated
NEWS_S2.TXT 490 296 deflated
PERCENT.TXT 8730 2827 deflated
PERCE_EX.TXT 8730 2827 deflated
SHADOWS.TXT 3216 1405 deflated
SHADO_S1.TXT 98 72 deflated
SHADO_S2.TXT 254 186 deflated
STREXTD.TXT 1653 754 deflated
STRMENUS.TXT 6035 2165 deflated
TNINFO.TXT 2961 1438 deflated
USING.TXT 7331 3055 deflated
USING_S1.TXT 148 81 deflated
USING_S2.TXT 255 170 deflated

Download File TN8908.ZIP Here

Contents of the COPYTO.TXT file


* Program........: CopyTo.PRG
* Author.........: Farivar Roshanian
* Date...........: Aug 2, 1989
* Version........: dBASE IV 1.0
* Notes..........: This procedure will copy the file currently
* in use then copy it to the filename specified
* and create the appropiate .MDX file.
* Parameters.....: mtarget
*
* To run the program
* DO CopyTo with ""
* where is the name of the file you want
* to copy to.
*
PARAMETERS mtarget
talkflag=SET("TALK")
exactflag=SET("EXACT")
confirmflag=SET("CONFIRM")
SET TALK OFF
SET EXACT ON
SET CONFIRM OFF
NULL=""

* -- store current status.
mfileopen=DBF()
mrecno=recno()
morder=ORDER()
* -- Verify that a database is open.
IF DBF()=NULL
? "No database in use"
RETURN
ENDIF
mselect=ALIAS()

* -- Copy the structure.
IF FILE("newtemp.dbf")
ERASE newtemp.dbf
ENDIF
COPY TO newtemp STRUCTURE EXTENDED

* -- Open the structure file in area 9.
SELECT 9
USE newtemp

* -- If the index file fieldname.ndx already exist, then erase it.
IF FILE("fieldname.ndx")
ERASE fieldname.ndx
ENDIF

* -- Index the file on Field_name
INDEX ON Field_name to fieldname
SELECT &mselect
ctr=1

* -- If there is a tag on a field, then modify the corresponding
* field in the structure file.
DO WHILE TAG(CTR)#NULL
mtagname=TRIM(TAG(ctr))
SELECT 9
SEEK mtagname
REPLACE Field_idx WITH "Y"
SELECT &mselect
ctr=ctr+1
ENDDO

* -- Close the structure file and erase the index file.
SELECT 9
USE
ERASE fieldname.NDX

* -- create a new file from the structure file.
SELECT &mselect
CREATE &mtarget from newtemp
APPEND FROM &mfileopen
USE &mfileopen
IF NULL#morder
SET ORDER TO TAG &morder
ENDIF
GO mrecno
ERASE newtemp.DBF
SET TALK &talkflag
SET EXACT &exactflag
SET CONFIRM &confirmflag
* EOP CopyTo


 December 21, 2017  Add comments

Leave a Reply