000010***** mission 2-5 ファイルに出力する ***** 000020 identification division. 000030 program-id. cnt005. 000040* 000050 environment division. 000060 input-output section. 000070 file-control. 000080 select f1 assign "c:\dat\cnt005.dat" 000090 organization line sequential. 000100* 000110 data division. 000120 file section. 000130 fd f1. 000140 01 f1r. 000150 03 f1-cnt pic 9(04). 000160 03 pic x(01). 000170 03 f1-hh pic 9(02). 000180 03 pic x(01). 000190 03 f1-mm pic 9(02). 000200 03 pic x(01). 000210 03 f1-ss pic 9(02). 000220* 000230 working-storage section. 000240 01 cnt pic 9(04) value 0. 000250 01 wtime. 000260 03 hh pic 9(02). 000270 03 mm pic 9(02). 000280 03 ss pic 9(02). 000290* 000300 procedure division. 000310 open output f1 000320 perform until cnt = 100 000330 add 1 to cnt 000340 accept wtime from time 000350 move space to f1r 000360 move cnt to f1-cnt 000370 move hh to f1-hh 000380 move mm to f1-mm 000390 move ss to f1-ss 000400 write f1r display f1r 000410 end-perform 000420 display "<<< cnt005-end >>>" 000430 close f1 stop run.