Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Data file mapping in Visual COBOL

$
0
0

I tested this under Net Express 5.1 and Visual COBOL 2.3 and it works perfectly with the preceding $. Without the $ it fails in both as it will not know that CNV is an environment variable so will not expand it.

I tested using the following program where I am setting CNV=C:\temp\ in Net Express project properties-->IDE and in Visual COBOL under Project Properties-->Application-->Environment Variables. The file chris.txt exists in C:\TEMP

       identification division.
       program-id. Program1.

       environment division.
       configuration section.

       data division.
       working-storage section.
       01 buffer   pic x(256) value "$CNV\chris.txt".
       01 cblt-fileexist-buf.
          03 cblte-fe-filesize        pic x(8) comp-x.
          03 cblte-fe-date.
              05 cblte-fe-day         pic x comp-x.
              05 cblte-fe-month       pic x comp-x.
              05 cblte-fe-year        pic x(2) comp-x.
          03 cblte-fe-time.
             05 cblte-fe-hours        pic x comp-x.
             05 cblte-fe-minutes      pic x comp-x.
             05 cblte-fe-seconds      pic x comp-x.
             05 cblte-fe-hundredths   pic x comp-x.

       procedure division.

           call "CBL_CHECK_FILE_EXIST" using buffer
              cblt-fileexist-buf
           display return-code
           goback.

       end program Program1.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>