Skip to main content

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

This instruction not find the file because you have not put the full name.
You have put the full name.

And replace "/" for "\\".

Example
"write C:\\Programas-wow\\doc-inventar\\TX999999.TXT"
or
"write F:\\Programas-wow\\doc-inventar\\TX999999.TXT"
or
"write \\\\server\\Programas-wow\\doc-inventar\\TX999999.TXT"


Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Thank you. Actually the form that I have shown has always worked and is working on my pc and others with windows 10. It has happened both for windows server versions and windows 10 recently installed. It seems that the problem is related to something related to windows permissions, I suppose but I can not confirm anything.

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

I have made the suggested changes and the problem persists.

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Made it

"notepad C:\\Programas-wow\\doc-inventar\\TX999999.TXT"

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Made it

"notepad C:\\Programas-wow\\doc-inventar\\TX999999.TXT"

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Made it

"notepad C:\\Programas-wow\\doc-inventar\\TX999999.TXT"

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

and later

"cmd /c write C:\\Programas-wow\\doc-inventar\\TX999999.TXT"


Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Thanks for your help. I have tried all the forms and none works. The way I do it has always worked well. On my pc with windows 10 it works fine. In other PCs with windows 10 whose installation is more than 6 months also continues to work well. The problem has arisen with three new pc with window 10 in which the instructions from rmcobol like the one that I describe do not work, are ignored by windows. I think the problem is in windows but I do not know what it is about. I have thought that windows does not give permission to the cobol runtime to run DOS. This is not about language syntax, it's something deeper about windows.

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Hi Wascar,

Does the call system to "notepad C:\\Programas-wow\\doc-inventar\\TX999999.TXT" work?

Your problem seems to be related to the PATH to cmd. Do you have c:\\windows\\system32 in your PATH environment variable? Then use the call system to "cmd /c write C:\\Programas-wow\\doc-inventar\\TX999999.TXT"

Regards,

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Thank you very much Juan Manuel. I did the tests and the problem persists. This has frustrated me because in my PC and others everything works fine without making changes while in recent installation the problem described.

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Which version of RM/COBOL are you using? Also, are you using a 32-bit or 64-bit version of Windows 10, and are you using the 32-bit or 64-bit version of the RM/COBOL runtime?

I have the very latest version of Windows 10 -- 1709 Creators Update -- and just tried the program below with version 12.14. It works fine, either invoking WRITE directly or using CMD.EXE /C to invoke WRITE. I used both forward slashes and backslashes as filename delimiters and tried it both with admin privileges and as a regular user.  

       IDENTIFICATION DIVISION.
       PROGRAM-ID.  "CallSystem".

       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  RMCOBOL.
       OBJECT-COMPUTER.  RMCOBOL.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       77  PAUSE PIC X.

       PROCEDURE DIVISION.
       MAIN-START.
           DISPLAY "BEGIN CALL SYSTEM TEST", ERASE.
           CALL "SYSTEM"
               USING "WRITE C:/WINDOWS/TEMP/TESTFILE1.LOG".
           CALL "SYSTEM"
               USING "CMD /C WRITE C:/WINDOWS/TEMP/TESTFILE2.LOG".
      *    CALL "SYSTEM"
      *        USING "CMD /K ECHO WRXYZ C:/WINDOWS/TEMP/TESTFILE2.LOG".
           DISPLAY "END CALL SYSTEM TEST".
           ACCEPT PAUSE.
           STOP RUN.

       END PROGRAM "CallSystem".

Try running just the commented-out line above. This will open a command window but it will hang around after the program completes. You can then see if there were any command errors. With the code above, I see:

'WRXYZ' is not recognized as an internal or external command,
operable program or batch file.

You can also insert CMD /K ECHO like this:

CALL "SYSTEM"
    USING "CMD /k ECHO WRITE C:/WINDOWS/TEMP/TESTFILE2.LOG".

to see the actual command.


Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

The result of the execution of your program is:
c:\\windows\\tmp\\tesfile1.log
Cannot find this file
Please verify that the correct path and file name are given
c:\\windows\\tmp\\tesfile2.log
Cannot find this file
Please verify that the correct path and file name are given
------------------------------------------------------------------------------

To illustrate the problem that I present, I would like to point out the following:
I use the latest version of rmcobol, runcobol, cobol wow and windows 10 on my PC.
On my PC whose windows were installed more than 6 months ago, the instructions I use to open text files work perfectly. The problem that I have detected arises after three instalations of windows 10 in the last two months and which is using the latest rmcobol runtime version. The three PCs described present the same problem. The problem is that windows ignores rmcobol runtime instruction to open the text file. To make sure that it is not the cobol runtime I have installed my own runtime on the three PCs and the problem continues. In all the tests my programs do not present errors and neither do windows. On one occasion I restarted the PC and when uploading wordpad opened the text file twice without the cobol program having been executed. So, if the program works perfectly on my PC, why does not it work the same on three other PCs with windows 10 completely updated?

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

I'm finding this very confusing.  It looks to me like these messages that you posted:

c:\\windows\\tmp\\tesfile1.log
Cannot find this file
Please verify that the correct path and file name are given
c:\\windows\\tmp\\tesfile2.log
Cannot find this file
Please verify that the correct path and file name are given

appeared in a message box that Wordpad (aka Windows Write) displayed.  That indicates that the RM/COBOL runtime is able to launch Windows Write, and then that program cannot open your text files.

However, this test didn't prove anything because the filenames in the messages are not correct:

    c:\\windows\\tmp\\tesfile1.log

should be

    c:\\windows\\temp\\testfile1.log

Did you change the names, or were they somehow mangled by the system?  If they're correct in the COBOL program, then there is clearly a problem somewhere.

There is no c:\\windows\\tmp directory.  On a problem system, please create these two text files in c:\\windows\\temp (just copy some other text file into these names):

C:\\Windows\\Temp\\testfile1.log
C:\\Windows\\Temp\\testfile2.log

and re-run the program.

Some more questions:

  1. Are you using a 32-bit or 64-bit runtime?
  2. Is this a 32-bit or 64-bit version of Windows 10, and is it Home, Pro, or Enterprise?

There are some differences between a completely fresh install of Windows 10 1709 and an upgraded system (what I have).  It would be good to have the results of the above test.

 

 


Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Wi Wascar,

Is this the screen you are describing? In that case, RM/COBOL is calling write but write is not finding the document to open.


Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

Hi. I discovered that there is a problem with the write.exe program. Using the DOS command line I went to the folder that contains the file TX000001.TXT. When I write the write command TX000001.TXT windows hangs for a few seconds and then ignores the command. Then I renamed the file as JAJA.TXT and wrote again write JAJA.TXT then it ran fine. This is a mystery because, as I said before, this only happens in the new PCs with windows 10. At this point I do not know what to do. It's not a rmcobol problem, that's what he said.
Thanks everyone for your help. Finally I decided to replace "WRITE" with "NOTEPAD". I also installed java virtual machine and this corrected things like the "CMD" ignored the exit instruction.

Hi.
On some Windows 10 PCs I have been confronting a problem when my software executes the next instruction from a rm cobol program. In the majority of the PCs with which I work this instruction works perfectly, but in the new Windows it ignores the instruction and I can not open the text file. Does anyone have any suggestions to solve this problem?

CALL "SYSTEM" USING QUE-TEXTO-OPEN

           02 QUE-TEXTO-OPEN.
              03 FILLER       PIC X(6) VALUE "WRITE ".
              03 FILLER       PIC X(17) VALUE "../Programas-wow/".
              03 FILLER       PIC X(13) VALUE "doc-inventar/".
              03 FILLER       PIC X(2) VALUE "TX".
              03 TEXTO-NUM    PIC 9(6).
              03 FILLER       PIC X(4) VALUE ".TXT".

"WRITE ../Programas-wow/doc-inventar/TX999999.TXT"

I wonder if this might be a Windows Defender issue. Maybe there is something in your TX000001.TXT file that it doesn't like, although that doesn't explain why renaming the file fixes the problem. Maybe it finds the origin of the file suspicious (does it come from the web?) and touching it with rename legitimizes the file. WRITE handles rich-text files so it's conceivable that opening files that contain certain tokens or symbols might be interpreted as an attack or trigger alerts. I wonder what happens if you rename it to JAJA.TXT and then rename it back. You might also check the system event log to see if there are any logged events.

In any case, glad you found a work-around.