0% found this document useful (0 votes)
4 views16 pages

ABAZA

The document outlines a program for creating and managing various database files related to financial records, including customer accounts, transactions, and bank details. It includes procedures for initializing data structures, saving and restoring data, and generating specific database files such as 'urdh.dbf', 'regj0.dbf', and 'karta.dbf'. The program also handles directory management and ensures the creation of necessary folders for data storage based on the current year.

Uploaded by

Teroni Zeka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views16 pages

ABAZA

The document outlines a program for creating and managing various database files related to financial records, including customer accounts, transactions, and bank details. It includes procedures for initializing data structures, saving and restoring data, and generating specific database files such as 'urdh.dbf', 'regj0.dbf', and 'karta.dbf'. The program also handles directory management and ensures the creation of necessary folders for data storage based on the current year.

Uploaded by

Teroni Zeka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 16

**************************************

************abaza.prg*****************
****formimi i datotekes se komintenteve
**************************************
parameters pw
if pcount()=0
pw=0
endif
close all
@0,0 clear
vitia="vitivij.mem"
vak=year(date())
if ! file(vitia)
save all like va? to (vitia)
endif
restore from (vitia) additive
@20,1 say "viti vijues " get vak pict "9999"
read
save all like va? to (vitia)
rrug=disku+":\"+curdir() &&direktoriumi thirres
viti=vak-2000
vitip=viti-1
vitia=viti+1
vitic=strzero(viti,2)
vitipc=strzero(vitip,2)
vitiac=strzero(vitia,2)
rrug1=rrug+"\"+vitic+"\" &&direktoriumi viti aktual
rrug1p=rrug+"\"+vitipc+"\" &&direktoriumi viti paraprak
rrug1a=rrug+"\"+vitiac+"\" &&direktoriumi viti ardhshem
if ! isdir(rrug+"\"+vitic)
kkd="md "+vitic
! (kkd)
endif
set color to &color2
@24,0 say "*******************"
set color to &color
use
***************************
****formimi i datotekes se urdhereses
**************************************
urdh=rrug1+"urdh.dbf"
tone(555,11)
declare A1[19],A2[19],A3[19],A4[19]
create punuesp
for i=1 to 18
A1[i]="dp"+strzero(i,2)
A2[i]="N"
A3[i]=10
A4[i]=0
next i
store "C" to
A2[2],A2[3],A2[7],A2[8],A2[11],A2[12],A2[13],A2[16],A2[17],A2[18]
store "D" to A2[14]
store 8 to A3[14] &&dt.ft
store 4 to A3[1],A3[3]
store 30 to A3[2],A3[11] && artikulli ; bleresi
store 10 to A3[4] && sasia
store 13 to A3[5] && qmimi
store 15 to A3[6],A3[15] && vlera, rabati
store 1 to A3[7] && me tatim P/J
store 3 to A3[8] && tarifa
store 5 to A3[9],A3[10] && % tatimi; % hekurudha
store 15 to A3[12] && selia
store 20 to A3[13] && adresa
store 10 to A3[16],A3[17],A3[18] && nr fiskal,ID tvsh, NRB
store 3 to A4[4],A4[5]
store 2 to A4[6],A4[9],A4[10],A4[15]
for i=1 to 18
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (urdh) from punuesp
use
delete file("punuesp.dbf")
release A1[19],A2[19],A3[19],A4[19]
***********************************************
****formimi i datotekes regjistrimit
***********************************************
regj0=rrug1+"regj0.dbf"
tone(427,3)
declare a1[10],a2[10],a3[10],a4[10]
create punuesh
for i=1 to 5
a1[i]="u"+strzero(i,2)
a2[i]="C"
a3[i]=12
a4[i]=0
next i
store "N" to a2[1],a2[3],a2[4],a2[5]
store 4 to a3[1] &&NR
store 30 to a3[2] &&artikulli
store 11 to a3[3] && sasia
store 11 to a3[4] && qmimi
store 12 to a3[5] && vlera
store 3 to a4[3],a4[4],a4[5] &&sasia qmimi vlera
for i=1 to 5
* @20,10 say i
append blank
replace field_name with a1[i]
replace field_type with a2[i]
replace field_len with a3[i]
replace field_dec with a4[i]
next i
create (regj0) from punuesh
use
delete file("punuesh.dbf")
release a1[10],a2[10],a3[10],a4[10]
use
*******************************
***********************************************
****formimi i datotekes karteles
**************************************
karta=rrug1+"karta.dbf"
tone(427,3)
declare a1[10],a2[10],a3[10],a4[10]
create punuesh
for i=1 to 10
a1[i]="u"+strzero(i,2)
a2[i]="C"
a3[i]=12
a4[i]=0
next i
store "N" to a2[1],a2[4],a2[5],a2[6],a2[8],a2[9]
store "D" to a2[2]
store 4 to a3[1] &&NR
store 8 to a3[2] &&dt
store 20 to a3[3] &&dokumenti
store 11 to a3[4] && debi
store 11 to a3[5] && kredi
store 11 to a3[6] && saldo
store 20 to a3[7] && libri ku esht dokumenti
store 5 to a3[8] && nr regj. ne liber
store 4 to a3[9] && nr komi
store 20 to a3[10] && komitenti
store 2 to a4[4],a4[5],a4[6] &&debi-kredi,saldo
for i=1 to 10
* @20,10 say i
append blank
replace field_name with a1[i]
replace field_type with a2[i]
replace field_len with a3[i]
replace field_dec with a4[i]
next i
create (karta) from punuesh
use
delete file("punuesh.dbf")
release a1[10],a2[10],a3[10],a4[10]
use
*******************************
***********************************************
dit0=rrug1+"dit0.dbf"
sal0=rrug1+"sal0.dbf"
**************************************
****formimi i datotekes ditarit
**************************************
tone(427,3)
declare a1[10],a2[10],a3[10],a4[10]
create punuesh
for i=1 to 10
a1[i]="u"+strzero(i,2)
a2[i]="C"
a3[i]=12
a4[i]=0
next i
store "N" to a2[2],a2[5],a2[6],a2[7],a2[8],a2[9]
store "D" to a2[1]
store 8 to a3[1] &&dt ditarit
store 12 to a3[5],a3[6] &&hyrje ;dalje
store 12 to a3[7] && saldo
store 5 to a3[2] && nr rendor
store 9 to a3[8] && nr ditarit
store 5 to a3[3] && nr dokumentit
store 20 to a3[4] && dokumentit
store 5 to a3[9] && SHIFRA KOMITENTIT OSE KONTO
store 30 to a3[10] && KOMITENTI OSE KONTO
store 2 to a4[5],a4[6],a4[7] &&debi-kredi
for i=1 to 10
* @20,10 say i
append blank
replace field_name with a1[i]
replace field_type with a2[i]
replace field_len with a3[i]
replace field_dec with a4[i]
next i
create (dit0) from punuesh
use
delete file("punuesh.dbf")
release a1[10],a2[10],a3[10],a4[10]
use
*******************************
**************************************
****formimi i datotekes se saldove ditore te ditarit
**************************************
sal0=rrug1+"sal0.dbf"
tone(427,3)
declare a1[5],a2[5],a3[5],a4[5]
create punuesh
for i=1 to 5
a1[i]="u"+strzero(i,2)
a2[i]="N"
a3[i]=12
a4[i]=0
next i
store "N" to a2[2],a2[3],a2[4]
store "D" to a2[1]
store 8 to a3[1] &&dt ditarit
store 12 to a3[2],a3[3] &&hyrje ;dalje
store 13 to a3[4] && saldo
store 4 to a3[5] && nr rendor; nr ditarit
store 2 to a4[2],a4[3],a4[4] &&debi-kredi
for i=1 to 5
* @20,10 say i
append blank
replace field_name with a1[i]
replace field_type with a2[i]
replace field_len with a3[i]
replace field_dec with a4[i]
next i
create (sal0) from punuesh
use
delete file("punuesh.dbf")
release a1[5],a2[5],a3[5],a4[5]
use
******************
lba0=rrug1+"lba0.dbf"
sab0=rrug1+"sab0.dbf"
**************************************
****formimi i libri bankes
**************************************
tone(427,3)
declare a1[12],a2[12],a3[12],a4[12]
create punuesh
for i=1 to 12
a1[i]="u"+strzero(i,2)
a2[i]="C"
a3[i]=12
a4[i]=0
next i
store "N" to a2[2],a2[5],a2[6],a2[7],a2[8],a2[9],a2[11]
store "D" to a2[1]
store 8 to a3[1] &&dt ditarit
store 12 to a3[5],a3[6] &&hyrje ;dalje
store 12 to a3[7] && saldo
store 5 to a3[2] && nr rendor
store 9 to a3[8] && nr ditarit
store 5 to a3[3] && nr dokumentit
store 20 to a3[4] && dokumentit
store 5 to a3[9] && SHIFRA KOMITENTIT OSE KONTO
store 20 to a3[10] && KOMITENTI
store 2 to a3[11] && SHIFRA e bankes
store 10 to a3[12] && emertimi bankes
store 2 to a4[5],a4[6],a4[7] &&debi-kredi
for i=1 to 12
* @20,10 say i
append blank
replace field_name with a1[i]
replace field_type with a2[i]
replace field_len with a3[i]
replace field_dec with a4[i]
next i
create (lba0) from punuesh
use
delete file("punuesh.dbf")
release a1[12],a2[12],a3[12],a4[12]
use
*******************************
**************************************
****formimi i datotekes se saldove ditore te ditarit
**************************************
sab0=rrug1+"sab0.dbf"
tone(427,3)
declare a1[6],a2[6],a3[6],a4[6]
create punuesh
for i=1 to 6
a1[i]="u"+strzero(i,2)
a2[i]="C"
a3[i]=12
a4[i]=0
next i
store "N" to a2[2],a2[3],a2[4]
store "D" to a2[1]
store 8 to a3[1] &&dt ditarit
store 12 to a3[2],a3[3] &&hyrje ;dalje
store 13 to a3[4] && saldo
store 4 to a3[5] && nr rendor; nr bakes
store 10 to a3[6] && emri bakes
store 2 to a4[2],a4[3],a4[4] &&debi-kredi
for i=1 to 6
* @20,10 say i
append blank
replace field_name with a1[i]
replace field_type with a2[i]
replace field_len with a3[i]
replace field_dec with a4[i]
next i
create (sab0) from punuesh
use
delete file("punuesh.dbf")
release a1[6],a2[6],a3[6],a4[6]
use
******************
komi0=rrug1+"komi0.dbf"
declare A1[8],A2[8],A3[8],A4[8]
create punuesh
for i=1 to 8
A1[i]="km"+strzero(i,2)
A2[i]="C"
A3[i]=15
A4[i]=0
next i
store "N" to A2[1]
store 5 to A3[1] &&shifra-partia
store 30 to A3[2] &&emertimi i komintentit
store 15 to A3[3] &&komuna
store 20 to A3[4] &&adresa
store 10 to A3[5] &&nr.fiskal
store 10 to A3[6] &&id tvsh
store 10 to A3[7] &&nrb
for i=1 to 8
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (komi0) from punuesh
use
delete file("punuesh.dbf")
release A1[8],A2[8],A3[8],A4[8]
*****************************
****formimi i datotekes se tatimeve (tatimet.dbf)
**************************************
tatimet=rrug1+"tatimet.dbf"
itatimet=rrug1+"itatimet.ntx"
if ! file(tatimet)
declare A1[6],A2[6],A3[6],A4[6]
create punues3
A1[1]="nr"
A1[2]="emri"
A1[3]="federativ"
A1[4]="republikan"
A1[5]="komunal"
A1[6]="pershkrimi"
store "C" to A2[1],A2[2],A2[6]
store "N" to A2[3],A2[4],A2[5]
store 15 to A3[2]
store 200 to A3[6]
store 3 to A3[1]
store 5 to A3[3],A3[4],A3[5]
store 0 to A4[1],A4[2],A4[6]
store 0 to A4[3],A4[4],A4[5]
for i=1 to 6
@24,60 say i
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (tatimet) from punues3
index on nr to (itatimet)
use
delete file("punues3.dbf")
release A1[6],A2[6],A3[6],A4[6]
endif
use
***************************
meb=rrug1+"meb.dbf"
meb1=rrug1+"meb1.ntx"
meb2=rrug1+"meb2.ntx"
if ! file(meb)
declare A1[6],A2[6],A3[6],A4[6]
create punuesp
for i=1 to 6
A1[i]="ko"+strzero(i,2)
A2[i]="C"
A3[i]=15
A4[i]=0
next i
store "N" to A2[1],A2[4],A2[5],A2[6]
store 2 to A3[1] &&nr bankes
store 10 to A3[2] &&emertimi bankes
store 20 to A3[3] &&xhirllog
store 13 to A3[4] &&debi
store 13 to A3[5] &&krebi
store 13 to A3[6] &&saldo
store 2 to A4[4],A4[5],A4[6]
for i=1 to 6
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (meb) from punuesp
use
delete file("punuesp.dbf")
release A1[6],A2[6],A3[6],A4[6]
endif
use (meb)

index on ko01 to (meb1)


index on ko02 to (meb2)
use
**************************************
****formimi i datotekes se emertimeve te depove
**************************************
edepo=rrug1+"edepo.dbf"
oedepo=rrug1+"oedepo.dbf"
* if ! file(oedepo)
declare A1[11],A2[11],A3[11],A4[11]
create punuesp
for i=1 to 11
if i>9
A1[i]="edp"+strzero(i,2)
else
A1[i]="edp"+str(i,1)
endif
A2[i]="C"
A3[i]=30
A4[i]=0
next i
store "N" to A2[1],A2[8]
store 2 to A3[1] && nr
store 30 to A3[2] && emertimi
store 15 to A3[3] && selia
store 20 to A3[4] && adresa
store 10 to A3[5] && nr fiskal
store 10 to A3[6] && nr TVSH
store 10 to A3[7] && nrb
store 5 to A3[8] && nr ft te fundit
store 70 to A3[9],A3[10],A3[11]&& shenime tjera psh xhirollog etj
for i=1 to 11
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (oedepo) from punuesp
use
delete file("punuesp.dbf")
release A1[11],A2[11],A3[11],A4[11]
* endif
use
use (oedepo)
zap
if ! file(edepo)
append from (edepo) all
endif
copy to (edepo)
*******************************************************************************
****formimi i datotekes se librit te pakices per shitore(lpakic.dbf)
**************************************
*i1=1
lpakic=rrug1+"pakic"+strzero(i1,2)+".dbf"
ldpakic=rrug1+"pakicd"+strzero(i1,2)+".ntx"
lnpakic=rrug1+"pakicn"+strzero(i1,2)+".ntx"
if ! file(lpakic)
declare A1[9],A2[9],A3[9],A4[9]
create punuesp
for i=1 to 9
A1[i]="pk"+str(i,1)
A2[i]="N"
A3[i]=13
A4[i]=2
next i
store "C" to A2[3]
store "D" to A2[2],A2[6]
store 5 to A3[1]
store 8 to A3[2],A3[6]
store 28 to A3[3]
*store 5 to A3[9]
store 0 to A4[1],A4[2],A4[3]
for i=1 to 9
* @20,10 say i
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (lpakic) from punuesp
index on pk2 to &ldpakic
index on pk1 to &lnpakic
use
delete file("punuesp.dbf")
release A1[9],A2[9],A3[9],A4[9]
endif
use
*******libri i shitjes
lshitje=rrug1+"shitje"+strzero(i1,2)+".dbf"
ldshitje=rrug1+"shitjed"+strzero(i1,2)+".ntx"
lnshitje=rrug1+"shitjen"+strzero(i1,2)+".ntx"
if ! file(lshitje)
declare A1[9],A2[9],A3[9],A4[9]
create punuesp
for i=1 to 7
A1[i]="pk"+str(i,1)
A2[i]="N"
A3[i]=13
A4[i]=2
next i
store "C" to A2[3],A2[5],A2[7]
store "D" to A2[2]
store 5 to A3[1]
store 8 to A3[2]
store 10 to A3[7]
store 24 to A3[5]
store 24 to A3[3]
store 0 to A4[1],A4[2],A4[3],A4[7],A4[5]
for i=1 to 7
* @20,10 say i
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (lshitje) from punuesp
index on pk2 to &ldshitje
index on pk1 to &lnshitje
use
delete file("punuesp.dbf")
release A1[9],A2[9],A3[9],A4[9]
endif
use
**************************************
*******libri i shpenzimeve
lshp=rrug1+"shp"+strzero(i1,2)+".dbf"
ldshp=rrug1+"shpd"+strzero(i1,2)+".ntx"
lnshp=rrug1+"shpn"+strzero(i1,2)+".ntx"
if ! file(lshp)
declare A1[23],A2[23],A3[23],A4[23]
create punuesp
for i=1 to 23
A1[i]="pk"+strzero(i,2)
A2[i]="N"
A3[i]=12
A4[i]=2
next i
store "C" to A2[3]
store "D" to A2[2]
store 4 to A3[1]
store 8 to A3[2]
store 24 to A3[3]
store 0 to A4[1],A4[2],A4[3]
for i=1 to 23
* @20,10 say i
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (lshp) from punuesp
index on pk02 to (ldshp)
index on pk01 to (lnshp)
use
delete file("punuesp.dbf")
release A1[23],A2[23],A3[23],A4[23]
endif
use
*****************************
otvsh=rrug1+"otvsh.dbf"
declare A1[15],A2[15],A3[15],A4[15]
create punuesp
for i=1 to 15
A1[i]="pk"+strzero(i,2)
A2[i]="N"
A3[i]=10
A4[i]=2
next i
store "C" to A2[3],A2[4],A2[5],A2[14]
store "D" to A2[2]
store 5 to A3[1]
store 1 to A3[11]
store 8 to A3[2]
store 20 to A3[3]
store 24 to A3[4]
store 10 to A3[5]
store 11 to A3[6]
store 5 to A3[13]
store 40 to A3[14]
store 5 to A3[15] && SHIFRA KOMITENTIT
store 0 to A4[1],A4[2],A4[3],A4[4],A4[5],A4[11],A4[13],A4[14]
for i=1 to 15
* @20,10 say i
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (otvsh) from punuesp
use
delete file("punuesp.dbf")
release A1[15],A2[15],A3[15],A4[15]
use
use
*******libri i tvshs per exel
ltvshex=rrug1+"tvshex"+strzero(i1,2)+".dbf"
declare A1[10],A2[10],A3[10],A4[10]
create punuesp
for i=1 to 10
A1[i]="pk"+strzero(i,2)
A2[i]="N"
A3[i]=15
A4[i]=2
next i
A1[1]="nr"
A1[2]="dt"
A1[3]="nr_ft"
A1[4]="Bleresi"
A1[5]="NIT"
A1[6]="Shitje_tot"
A1[7]="shitje_per"
A1[8]="furniz_0"
A1[9]="Vl_tatush"
A1[10]="TVSH"
store "C" to A2[3],A2[4],A2[5]
store "D" to A2[2]
store 4 to A3[1]
store 8 to A3[2]
store 7 to A3[3]
store 24 to A3[4]
store 10 to A3[5]
*store 11 to A3[6]
store 0 to A4[1],A4[2],A4[3],A4[4],A4[5]
for i=1 to 10
* @20,10 say i
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (ltvshex) from punuesp
use
delete file("punuesp.dbf")
release A1[10],A2[10],A3[10],A4[10]
use
*******libri i tvb per exel
ltvbex=rrug1+"tvbex"+strzero(i1,2)+".dbf"
declare A1[10],A2[10],A3[10],A4[10]
create punuesp
for i=1 to 10
A1[i]="pk"+strzero(i,2)
A2[i]="N"
A3[i]=15
A4[i]=2
next i
A1[1]="nr"
A1[2]="dt"
A1[3]="nr_ft"
A1[4]="shitesi"
A1[5]="NIT"
A1[6]="bl_pa_TVSH"
A1[7]="importet"
A1[8]="impor_TVSH"
A1[9]="Vendore"
A1[10]="Vend_TVSH"
store "C" to A2[3],A2[4],A2[5]
store "D" to A2[2]
store 4 to A3[1]
store 8 to A3[2]
store 7 to A3[3]
store 24 to A3[4]
store 10 to A3[5]
*store 11 to A3[6]
store 0 to A4[1],A4[2],A4[3],A4[4],A4[5]
for i=1 to 10
* @20,10 say i
append blank
replace field_name with A1[i]
replace field_type with A2[i]
replace field_len with A3[i]
replace field_dec with A4[i]
next i
create (ltvbex) from punuesp
use
delete file("punuesp.dbf")
release A1[10],A2[10],A3[10],A4[10]
use
tone(427,3)
@24,0 clear
close all
do arein
return
***************************
*arein.prg reindexsimi
*********************************
procedure arein
@24,0 say "sortimi i datotekave"
close all
@0,0 clear
vitia="vitivij.mem"
vak=year(date())
if ! file(vitia)
save all like va? to (vitia)
endif
restore from (vitia) additive
if 1=2
@20,1 say "viti vijues " get vak pict "9999"
read
save all like va? to (vitia)
endif
*************saldot ditore te arkes******************888
sal0=rrug1+"sal0.dbf"
saldo=rrug1+"s"+strzero(i1,2)+".dbf"
saldo1=rrug1+"sx"+strzero(i1,2)+".ntx"
use (sal0);zap
if ! file(saldo)
copy to (saldo)
else
append from(saldo) all
copy to (saldo)
endif
use (saldo)
index on u01 to (saldo1)
*********libri arkes**********************
dit0=rrug1+"dit0.dbf"
ditar=rrug1+"d"+strzero(i1,2)+".dbf"
ditar1=rrug1+"dx1"+strzero(i1,2)+".ntx"
ditar9=rrug1+"dx9"+strzero(i1,2)+".ntx"
use (dit0)
zap
if ! file(ditar)
copy to (ditar)
else
append from(ditar) all
copy to (ditar)
endif
use (ditar)
index on u09 to (ditar9)
index on u01 to (ditar1)
use
do renditja
do psald
close all
*********libri bankes***********************
select 1
lba0=rrug1+"lba0.dbf"
sab0=rrug1+"sab0.dbf"
lbank=rrug1+"b"+strzero(i1,2)+".dbf"
lbank=rrug1+"b"+strzero(i1,2)+".dbf"
lbank1=rrug1+"bx1"+strzero(i1,2)+".ntx"
lbank2=rrug1+"bx2"+strzero(i1,2)+".ntx"
lbank9=rrug1+"bx9"+strzero(i1,2)+".ntx"
lbank11=rrug1+"bx11"+strzero(i1,2)+".ntx"
if ! file(lbank)
copy file (lba0) to (lbank)
endif
use (lbank)
delete for u02=0 all
pack
index on u01 to (lbank1)
index on u02 to (lbank2)
index on u09 to (lbank9)
index on u11 to (lbank11)

************ komitentet*********************
komi0=rrug1+"komi0.dbf"
select 1
use (komi0)
zap
komi=rrug1+"komi"+strzero(i1,2)+".dbf"
if ! file(komi)
copy to (komi)
else
append from(komi) all
copy to (komi)
endif
komi1=rrug1+"komi1"+strzero(i1,2)+".ntx"
komi2=rrug1+"komi2"+strzero(i1,2)+".ntx"
select 1
use
if ! netuse(komi,.t.,10)
return
endif
index on km01 to (komi1)
index on km02 to (komi2)
use
************* tatimet *******************
@22,0 clear
tatimet=rrug1+"tatimet.dbf"
itatimet=rrug1+"itatimet.ntx"
select 1
use
if ! netuse(tatimet,.t.,10)
return
endif
index on nr to (itatimet)
use
**************************************
edepo=rrug1+"edepo.dbf"
edepo1=rrug1+"edepo1.ntx"
if ! netuse(edepo,.t.,10)
return
endif
index on edp1 to (edepo1)
use
********* libri shitjes****************
ltvsh=rrug1+"tvsh"+strzero(i1,2)+".dbf"
lsh2=rrug1+"lsh2"+strzero(i1,2)+".ntx"
lsh1=rrug1+"lsh1"+strzero(i1,2)+".ntx"
lsh15=rrug1+"lsh15"+strzero(i1,2)+".ntx"
select 1
use(otvsh)
zap;use
if ! file(ltvsh)
copy file (otvsh) to (ltvsh)
else
select 1
if ! netuse(otvsh,.t.,10)
return
endif
append from(ltvsh) all
delete file(ltvsh)
copy to (ltvsh)
endif
select 1
use
if ! netuse(ltvsh,.t.,10)
return
endif
index on pk01 to (lsh1)
index on pk02 to (lsh2)
index on pk15 to (lsh15)
************libri blerjes *****************************
ltvb=rrug1+"tvb"+strzero(i1,2)+".dbf"
lb1=rrug1+"lb1"+strzero(i1,2)+".ntx"
lb2=rrug1+"lb2"+strzero(i1,2)+".ntx"
lb15=rrug1+"lb15"+strzero(i1,2)+".ntx"
otvsh=rrug1+"otvsh.dbf"
select 1
use(otvsh)
zap;use
if ! file(ltvb)
copy file (otvsh) to (ltvb)
else
select 1
if ! netuse(otvsh,.t.,10)
return
endif
append from(ltvb) all
delete file(ltvb)
copy to (ltvb)
endif
select 1
use
if ! netuse(ltvb,.t.,10)
return
endif
index on pk01 to (lb1)
index on pk02 to (lb2)
index on pk15 to (lb15)
********************************************
use
@24,0 clear
return
**************************************
**************************************************
procedure renditja
kk1=1
use (ditar)
index on u09 to (ditar9)
index on u01 to (ditar1)
set index to (ditar1),(ditar9)
go top
au01=u01;au08:=1;au02:=0
do while ! eof()
if au01#u01
au02=1
au01=u01
au08=au08+1
else
au02=au02+1
endif
replace u02 with au02,u08 with au08
skip
enddo
return
*******************
##############################################################################

You might also like