Skip to main content

With AcuCobol we generate files in different formats (pdf, xls, docx, txt, csv,....) and the user wants to open it.

Is it possible to open a file with the standard application on the client? Like clicking on the file in the windows explorer.

1)  "C$system" requires the name of the application (e.g. C$SYSTEM "@[DISPLAY]:C:\\notepad myfile.txt")

2) As well as "C$run" (C$RUN "@[DISPLAY]:C:\\notepad myfile.txt).

3) Calling the browser control with a file name doesn't work with all formats

The problem is that we don't know what standard apllications are installed on the client.

Am I to silly to find the right statement?

With AcuCobol we generate files in different formats (pdf, xls, docx, txt, csv,....) and the user wants to open it.

Is it possible to open a file with the standard application on the client? Like clicking on the file in the windows explorer.

1)  "C$system" requires the name of the application (e.g. C$SYSTEM "@[DISPLAY]:C:\\notepad myfile.txt")

2) As well as "C$run" (C$RUN "@[DISPLAY]:C:\\notepad myfile.txt).

3) Calling the browser control with a file name doesn't work with all formats

The problem is that we don't know what standard apllications are installed on the client.

Am I to silly to find the right statement?

The name of the application is not required. The same as with clicking on the file in windows explorer, windows will automatically use the "default app'lication associated with the file type when you make a system call.


With AcuCobol we generate files in different formats (pdf, xls, docx, txt, csv,....) and the user wants to open it.

Is it possible to open a file with the standard application on the client? Like clicking on the file in the windows explorer.

1)  "C$system" requires the name of the application (e.g. C$SYSTEM "@[DISPLAY]:C:\\notepad myfile.txt")

2) As well as "C$run" (C$RUN "@[DISPLAY]:C:\\notepad myfile.txt).

3) Calling the browser control with a file name doesn't work with all formats

The problem is that we don't know what standard apllications are installed on the client.

Am I to silly to find the right statement?

The name of the application is not required. The same as with clicking on the file in windows explorer, windows will automatically use the "default app'lication associated with the file type when you make a system call.


With AcuCobol we generate files in different formats (pdf, xls, docx, txt, csv,....) and the user wants to open it.

Is it possible to open a file with the standard application on the client? Like clicking on the file in the windows explorer.

1)  "C$system" requires the name of the application (e.g. C$SYSTEM "@[DISPLAY]:C:\\notepad myfile.txt")

2) As well as "C$run" (C$RUN "@[DISPLAY]:C:\\notepad myfile.txt).

3) Calling the browser control with a file name doesn't work with all formats

The problem is that we don't know what standard apllications are installed on the client.

Am I to silly to find the right statement?

Good morning, Mr Martin Richter

ACUCOBOL-GT 10.5 will include a new library routine called WIN$SHELLEXECUTE.

This will emulate the ShellExecuteEx() Win32 API function, which is what is executed when a user double-clicks on an icon in Windows Explorer.

If you are interested in testing 10.5.0, please contact your Account Manager, or open a Case on the Support Portal - https://portal.microfocus.com/s/?language=en_US

The Beta Test program is launched at the end of August.


The name of the application is not required. The same as with clicking on the file in windows explorer, windows will automatically use the "default app'lication associated with the file type when you make a system call.

Hi Peter,

I tried

              add csys-desktop, csys-maximized, csys-async
                 giving ws-csys-flags
              call "c$system" using "c:\\temp\\test.pdf"
                                  , ws-csys-flags
                  giving status-val
              end-call

The return value in status-val is "5", nothing happenes.

Standard application is "Adobe reader DC", clicking on the file in the windows explorer works.


With AcuCobol we generate files in different formats (pdf, xls, docx, txt, csv,....) and the user wants to open it.

Is it possible to open a file with the standard application on the client? Like clicking on the file in the windows explorer.

1)  "C$system" requires the name of the application (e.g. C$SYSTEM "@[DISPLAY]:C:\\notepad myfile.txt")

2) As well as "C$run" (C$RUN "@[DISPLAY]:C:\\notepad myfile.txt).

3) Calling the browser control with a file name doesn't work with all formats

The problem is that we don't know what standard apllications are installed on the client.

Am I to silly to find the right statement?

Hi Martin,

we use C$SYSTEM with the command "start" to open a file with the standard application and it works for us.