Migration from RMCOBOL: working with the RM/COBOL File Handler

[Migrated content. Thread originally posted on 20 December 2011]

Hello,

I am migrating to VisualCobol some RMCOBOL programs , and I have found some problems. I wanted to know if there is some kind of solution for these problems, or if it will be corrected in future VisualCobol versions

1)When we want to verify that a file exists, some programs perform the following instructions ..
             
        ....

           SELECT OPTIONAL FICHSEC ASSIGN TO RANDOM LOC-FICHSEC
                  ORGANIZATION LINE SEQUENTIAL
                  ACCESS IS SEQUENTIAL
                  FILE STATUS IS STAT-FICHSEC.

        ....

           OPEN INPUT FICHSEC.         
           IF   STAT-FICHSEC IS EQUAL '05'
           THEN MOVE "THE FILE NOT EXISTS" TO MENSA
                PERFORM AVISO
                GO FIN-PROGRAMA
           ELSE ...               
           END-IF.
        ....



In the VisualCobol program source, I use the directive NOOPTIONAL-FILE; so when I open the file for I-O, this status-file control works correctly, but not when I open it for INPUT.
What can I do without having to modify the code??


2)When we define the files locations we use environment variables


                ....
                MOVE "$VOL/FILES/FICHSEC1".
                OPEN INPUT FICHSEC.         
                ...


But it doesn't work with VisualCobol. What can we do with it?


3)When we work with Indexed Files, some times we use the sentences:


          START FICHWIN KEY FIRST KEY-1-WIN...
         
          or
         
          START FICHWIN KEY LAST KEY-1-WIN...

But it doesn't work with VisualCobol. Will be worked out in the next versions of VisualCobol???


Thanks in advance

Parents Reply Children
No Data