I still have problems with Clipper code to convert to VFP9.
I will return an error code in the red line,
append from
why?
Gianni
I will return an error code in the red line,
append from
why?
Gianni
Code:
******************inizio processo di creazione attivit…***********
use giorni
index on giorno to gio
set index to gio
GOTO TOP
DO WHILE .NOT. EOF()
STORE RECNO() TO NREC_GIO
store giorNO to mgiorno
STORE GIORNO TO MGIO
use dipend
do while .not. eof()
store recno() to nrec_dip
store badge to mbadge
STORE BADGE TO MBAD
store nome to mnome
store alltrim(file)+".dbf" to mfile
use prd1 EXCLUSIVE
zap
[COLOR=red]append from prd.dbf for giorno=mgiorno .and. badge=mbadge[/color]
use
USE prd1
SORT ON DA TO PRD2
use
use PRD2
goto top
store recno() to nrec_tmp
store e_u to me_u
do while .not. eof()
store recno() to nrec_tmp
store e_u to me_u
if me_u="E"
if NREC_TMP<RECCOUNT()
SKIP
STORE E_U TO mE_U
store da to mda
store numero to mnumero
GOTO NREC_TMP
IF ME_U="U"
REPLACE E_U WITH "U"
ENDIF
replace a with mda
replace numero with mnumero
endif
endif
if me_u=" "
GOTO NREC_TMP
if NREC_TMP<RECCOUNT()
SKIP
STORE E_U TO mE_U
store da to mda
store numero to mnumero
GOTO NREC_TMP
IF ME_U="U"
REPLACE E_U WITH "U"
ENDIF
replace a with mda
replace numero with mnumero
ENDIF
endif
skip
enddo
DELETE ALL FOR E_U="U" .AND. EMPTY(A)
DELETE ALL FOR EMPTY(E_U) .AND. EMPTY(A)
PACK
close all
**** PRD2
***********************trasporto ore e lavorazioni negli archivi
***********************dei dipendenti
use prd2
do while .not. eof()
store recno() to nrec_prod
STORE DA TO MDA
STORE A TO MA
store val(numero) to mnumero
store ore to more
store e_u to me_u
use elelav
locate for numero=mnumero
if found()
store identific to mident
ELSE
MIDENT=" "
endif
use (mfile)
locate for day(data)=day(mgio) .and. month(data)=month(mgio)
*if .not. found()
append blank
replace data with mgio
REPLACE DA WITH MDA
REPLACE A WITH MA
replace n_lav with mnumero
replace descr with mident
if empty(mda) .or. empty(ma)
replace n_ore with 0
else
min11=(VAL(SUBSTR(mda,1,2))*60)+(VAL(SUBSTR(mda,4,2)))
min22=(VAL(SUBSTR(ma,1,2))*60)+(VAL(SUBSTR(ma,4,2)))
REPLACE N_ORE WITH (min22/60)-(min11/60)
replace e_u with me_u
endif
*endif
use
use prd2
GOto nrec_prod
SKIP
ENDDO
USE PRD2
ZAP
USE
use dipend
goto nrec_dip
skip
enddo
use giorni index gio
goto nrec_gio
skip
enddo
********************fine ciclo giorni