Lecture du fichier de test input

This commit is contained in:
rick 2021-03-07 11:35:12 +01:00
parent cb37874d42
commit 3f75383e35
Signed by: Rick
GPG key ID: 2B593F087240EE99
2 changed files with 41 additions and 0 deletions

2
jour05/input Normal file
View file

@ -0,0 +1,2 @@
ugknbfddgicrmopn
jchzalrnumimnmhp

39
jour05/test.cob Normal file
View file

@ -0,0 +1,39 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. jour-cinq-prem-part.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT FILE1 ASSIGN TO "input"
ORGANIZATION LINE SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD FILE1.
01 INPUT-FILE.
02 STR PIC A(17).
WORKING-STORAGE SECTION.
01 MY-FILE.
02 STR PIC A(17).
01 WS-STATUS PIC X VALUE 'N'.
88 EOF VALUE 'Y'.
PROCEDURE DIVISION.
main.
OPEN INPUT FILE1.
PERFORM UNTIL EOF
READ FILE1 RECORD INTO MY-FILE
AT END MOVE 'Y' TO WS-STATUS
NOT AT END DISPLAY MY-FILE
END-READ
END-PERFORM.
CLOSE FILE1.
STOP RUN.
END PROGRAM jour-cinq-prem-part.
*deuxième étape, lire car par car
*troisième étape, check si voyelle
*retenir lettre act et pred pour check mot interdit
*retenir lettre jusquà double