Skip to main content

[archive] Problem C$SYSTEM

  • April 27, 2008
  • 3 replies
  • 0 views

[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

3 replies

[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
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".

[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
Yes that works well.

Thanks a lot.
Andre,

[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
Yes that works well.

Thanks a lot.
Andre,