Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program-id. indToSeq as "indToSeq".
- environment division.
- configuration section.
- input-output section.
- file-control.
- select fispec assign to "G:\Fichier COBOL\SPECTACLE.ind"
- organization is indexed
- access mode is dynamic
- record key is codeSpect
- alternate record key is titre with duplicates
- alternate record key is dateRepresentation with duplicates
- file status is fs-spec.
- select listing assign to "G:\Fichier COBOL\listingSORTIE.seq"
- organization is line sequential
- file status is fs-lis.
- select specSeq assign to "G:\Fichier COBOL\spectacleSeq.seq"
- organization is line sequential
- file status is fs-specSeq.
- data division.
- file section.
- FD fispec.
- 01 r-spectacle.
- 02 codeSpect.
- 03 codeGenre pic x(5).
- 03 codeNum pic 9(2).
- 02 titre pic x(30).
- 02 numSalle pic 99.
- 02 dateRepresentation pic 9999.
- 02 tabReservCateg occurs 3.
- 03 nbReserv pic 9(3).
- FD listing.
- 01 r-listing pic x(80).
- FD specSeq.
- 01 r-specSeq.
- 02 codeGenreSeq pic x(5).
- 02 codeNumSeq pic 99.
- 02 titreSeq pic x(30).
- 02 numSalleSeq pic 99.
- 02 dateSeq pic 9(4).
- 02 tabCategSeq occurs 3.
- 03 nbReservSeq pic 999.
- working-storage section.
- 01 fs-spec pic xx.
- 88 erreur value "10" thru "99".
- 01 fs-lis pic xx.
- 88 fintrt value "10".
- 01 fs-specSeq pic xx.
- 88 finSpecSeq value "10".
- procedure division.
- main.
- perform seqtoind.
- perform indtoseq.
- seqtoind.
- open output fispec
- input specSeq.
- read specSeq.
- perform until erreur
- write r-spectacle from r-specseq
- read specSeq
- end-perform.
- close specseq fispec.
- indtoseq.
- open input fispec
- output listing.
- move spaces to codeSpect.
- start fispec key is > codeSpect
- invalid key display "fichier vide"
- not invalid key read fispec NEXT end-read
- end-start.
- perform until erreur
- write r-listing from r-spectacle end-write
- read fispec NEXT end-read
- end-perform.
- close fispec listing.
- stop run.
- end program indToSeq.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement