COBOL打开文件时未找到文件

问题描述 投票:-1回答:1

我正在尝试使自己熟悉COBOL。我尝试启动以下程序:

   identification division.
   program-id. Bestand.
   date-written. 08.05.2020

   environment division.
   input-output section.
   file-control.
       select bestand-datei-ein assign to
       "C:\Users\Michael\Desktop\Microfocus\Programme\aus.txt".
       select bestand-datei-aus assign to
       "C:\Users\Michael\Desktop\Microfocus\Programme\aus.txt".

   data division.
   file section.
   fd  bestand-datei-ein label records are omitted.

   01 bestand-satz-ein.
     05 e-teile-nr               PIC X(6).
     05 e-bestand-menge          PIC 9(5).
     05 e-eingang-menge          PIC 9(4).
     05 e-stueck-preis           PIC 999V99.

   fd bestand-datei-aus label records are omitted.

   01 bestand-satz-aus.
     05 a-teile-nr                 PIC X(6).
     05 filler                     PIC X(4).
     05 a-bestand-menge            PIC 9(5).
     05 filler                     PIC X(3).
     05 a-eingang-menge            PIC 9(4).
     05 filler                     PIC X(3).
     05 a-stueck-preis             PIC 999.99.
     05 filler                     PIC X(3).
     05 a-bestand-menge-neu        PIC 9(5).
     05 filler                     PIC X(3).
     05 a-kosten                   PIC 9(6).99.

   01 a PIC X.

   working-storage section.

   01 bestand-datei-ein-ende       PIC X.

   procedure division.

   a000-haupt-steuerung-routine.
       open input      bestand-datei-ein
            output     bestand-datei-aus.

       move 'N' to bestand-datei-ein-ende.

       read bestand-datei-ein
           at end move 'J' to bestand-datei-ein-ende.

       perform b010-listen-bestandsdaten
         until bestand-datei-ein-ende = 'J'.

       close bestand-datei-aus
             bestand-datei-ein.

       accept a.

       stop run.


   b010-listen-bestandsdaten.
       move spaces to bestand-satz-aus.
       move e-teile-nr to a-teile-nr.
       move e-bestand-menge to a-bestand-menge.
       move e-eingang-menge to a-eingang-menge.
       move e-stueck-preis to a-stueck-preis.
       add e-bestand-menge, e-eingang-menge
         giving a-bestand-menge-neu.

       multiply a-bestand-menge-neu by e-stueck-preis
         giving a-kosten.

       read bestand-datei-ein
           at end
               move 'J' to bestand-datei-ein-ende.

当我启动程序并应将其打开时,总是收到错误消息“找不到文件:C:\ Users \ Michael \ Desktop \ Microfocus \ Program \ aus.txt”。>

我与Micro Focus Visual Cobol for Visual Studio合作

任何想法?

我正在尝试使自己熟悉COBOL。我尝试启动以下程序:识别师。程序ID。贝斯坦。日期写的。 2020年8月5日环境部门。输入-...

windows cobol microfocus
1个回答
0
投票

来自评论:

© www.soinside.com 2019 - 2024. All rights reserved.