Highlighted
Absent Member.
Absent Member.
290 views

[archive] Problem C$SYSTEM

[Migrated content. Thread originally posted on 26 April 2008]

I have a problem opening a pdf file which contains spaces.

start c:\myfile\my.pdf works ok
start "c:\myfile\my.pdf" only opens a command prompt
start "c:\my file\my.pdf" "
start 'c:\my file\my.pdf' windows can't find file.
start c:\my(file)\my.pdf doesn't work


I am using C$SYSTEM with flags 201.

Can someone please help me.
Thanks
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Problem C$SYSTEM

try this routine
************->in working-storage section
01 open-command.
02 filler pic x(4) value "Open".
02 filler pic x value x"00".

77 my-file pic x(100) value "c:\my file\aaa.pdf".
77 sw-show usage is unsigned-int value is 5.


********->in procedure division.
open_default_extension.
inspect my-file replacing trailing spaces by low-values
call "shell32.dll".
call "ShellExecuteA" using by value 0,
by reference open-command,
by reference my-file,
null,
null,
by value SW-SHOW.

cancel "ShellExecuteA".
cancel "shell32.dll".
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Problem C$SYSTEM

Yes that works well.

Thanks a lot.
Andre,
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.