DATABASE

MAIN

DEFINE p_soft ARRAY[100] OF RECORD

p_nazov LIKE soft.nazov,

p_cena LIKE soft.cena

END RECORD

DEFINE poc,pocet, koniec SMALLINT

DEFINE p_adres RECORD

p_nazov LIKE adres.nazov,

p_mesto LIKE adres.mesto,

p_tel LIKE adres.tel

END RECORD

DEFINE p_kod_dod LIKE adres.kod_dod

PROMPT "Zadaj kod dodavatela: " .

SELECT . INTO .. FROM . //vyber adresy firmy

WHERE ..

DECLARE c_soft CURSOR FOR SELECT .. FROM . //vyber softveru

WHERE ..

OPEN FORM

DISPLAY FORM ..

DISPLAY . //zobrazenie adresy firmy

 

OPEN c_soft

LET koniec= FALSE

WHILE NOT koniec

LET pocet=0

WHILE pocet < 100

LET pocet=pocet+1

FETCH c_soft INTO p_soft[pocet].*

IF STATUS=NOTFOUND THEN

LET koniec=TRUE

LET pocet=pocet-1

EXIT WHILE

END IF

END WHILE

CALL set_count(pocet)

DISPLAY ARRAY p_soft TO s_soft.*

END WHILE

END MAIN