cours0708/P5B/cobol/exercices/vehic2.cbl

41 lines
1.3 KiB
Plaintext
Raw Normal View History

2008-11-25 21:11:16 +00:00
identification division.
program-id. vehic2.
author. od.
environment division.
input-output section.
file-control.
select articles assign to "$fichier"
organization is indexed
record key is mtrcl
alternate record key is no-smn with duplicates
alternate record key is rslt with duplicates
file status val-erreur.
***---------------------------------------------------------------
data division.
file section.
fd articles.
* structure fournie dans l'exercice
01 vhcl.
05 indicatif.
10 mtrcl pic x(8).
10 no-smn pic 99.
05 filler pic x(8).
05 rslt occurs 7.
10 km pic 9(4) value zero.
10 frs pic 9(4)v99 value zero.
working-storage section.
77 val-erreur pic 99 value zero.
77 enregistrement pic x(88) value zero.
procedure division.
programme section.
init.
open input articles.
display val-erreur.
corps.
read articles.
display mtrcl.
fin.
close articleS.
display "fin de traitement".
stop run.