Skip to main content

[archive] calling c$system

  • July 4, 2007
  • 6 replies
  • 0 views

[Migrated content. Thread originally posted on 04 July 2007]

I am using a call to c$system to display image/picture files (.jpg .tif .pdf etc,).

Where the file name has imbedded spaces, it does not work whatever the setting of FILENAME_SPACES.

I use:
call c$system using w-filename 96.
If w-filename has the value "c:\\myfile.jpg" it displays the file correctly
If w-filename has the value "c:\\my file.jpg" 96 - it does not display the file.

I have tried using trailing spaces and trailing x"00" in the file name.

Anyone have an idea of why this is happening?

6 replies

[Migrated content. Thread originally posted on 04 July 2007]

I am using a call to c$system to display image/picture files (.jpg .tif .pdf etc,).

Where the file name has imbedded spaces, it does not work whatever the setting of FILENAME_SPACES.

I use:
call c$system using w-filename 96.
If w-filename has the value "c:\\myfile.jpg" it displays the file correctly
If w-filename has the value "c:\\my file.jpg" 96 - it does not display the file.

I have tried using trailing spaces and trailing x"00" in the file name.

Anyone have an idea of why this is happening?
also tried using

start where is 'c:\\my dir\\my file.pdf'

this states that the file 'c:\\my' does not exist.

[Migrated content. Thread originally posted on 04 July 2007]

I am using a call to c$system to display image/picture files (.jpg .tif .pdf etc,).

Where the file name has imbedded spaces, it does not work whatever the setting of FILENAME_SPACES.

I use:
call c$system using w-filename 96.
If w-filename has the value "c:\\myfile.jpg" it displays the file correctly
If w-filename has the value "c:\\my file.jpg" 96 - it does not display the file.

I have tried using trailing spaces and trailing x"00" in the file name.

Anyone have an idea of why this is happening?
Very close.

Try enclosing the ENTIRE filename in double-quotes (Hex 22)

The OS is interpreting the space-separators as command delimiters, so your command looks like a command "c:\\my" with a parameter of "file.jpg"

03 W-FILENAME.
05 FILLER PIC X(01) VALUE X"22".
05 FILLER PIC X(14) VALUE "c:\\my file.jpg".
05 FILLER PIC X(01) VALUE X"22".
05 FILLER PIC X(01) VALUE X"00".

should work for you. It does for me!

[Migrated content. Thread originally posted on 04 July 2007]

I am using a call to c$system to display image/picture files (.jpg .tif .pdf etc,).

Where the file name has imbedded spaces, it does not work whatever the setting of FILENAME_SPACES.

I use:
call c$system using w-filename 96.
If w-filename has the value "c:\\myfile.jpg" it displays the file correctly
If w-filename has the value "c:\\my file.jpg" 96 - it does not display the file.

I have tried using trailing spaces and trailing x"00" in the file name.

Anyone have an idea of why this is happening?
Well I have tried some of these tricks - all to no avail as yet.

If I call c$system with it says windows cant find the file

If I call c$system with it loads up a cmd window just showing a prompt

If it works on your system - what am I doing wrong?

[Migrated content. Thread originally posted on 04 July 2007]

I am using a call to c$system to display image/picture files (.jpg .tif .pdf etc,).

Where the file name has imbedded spaces, it does not work whatever the setting of FILENAME_SPACES.

I use:
call c$system using w-filename 96.
If w-filename has the value "c:\\myfile.jpg" it displays the file correctly
If w-filename has the value "c:\\my file.jpg" 96 - it does not display the file.

I have tried using trailing spaces and trailing x"00" in the file name.

Anyone have an idea of why this is happening?
Well I have tried some of these tricks - all to no avail as yet.

If I call c$system with it says windows cant find the file

If I call c$system with it loads up a cmd window just showing a prompt

If it works on your system - what am I doing wrong?

[Migrated content. Thread originally posted on 04 July 2007]

I am using a call to c$system to display image/picture files (.jpg .tif .pdf etc,).

Where the file name has imbedded spaces, it does not work whatever the setting of FILENAME_SPACES.

I use:
call c$system using w-filename 96.
If w-filename has the value "c:\\myfile.jpg" it displays the file correctly
If w-filename has the value "c:\\my file.jpg" 96 - it does not display the file.

I have tried using trailing spaces and trailing x"00" in the file name.

Anyone have an idea of why this is happening?
Well I have tried some of these tricks - all to no avail as yet.

If I call c$system with it says windows cant find the file

If I call c$system with it loads up a cmd window just showing a prompt

If it works on your system - what am I doing wrong?

[Migrated content. Thread originally posted on 04 July 2007]

I am using a call to c$system to display image/picture files (.jpg .tif .pdf etc,).

Where the file name has imbedded spaces, it does not work whatever the setting of FILENAME_SPACES.

I use:
call c$system using w-filename 96.
If w-filename has the value "c:\\myfile.jpg" it displays the file correctly
If w-filename has the value "c:\\my file.jpg" 96 - it does not display the file.

I have tried using trailing spaces and trailing x"00" in the file name.

Anyone have an idea of why this is happening?
You were correct, if I use quotes around the file name but do not use 'START' then it now works. This seems very inconsistent but many thanks for the help and the solution.

But just when it seemed to be safe to get back in the water - any filename that contains open or close bracket "(" and ")" does not invoke the file type defined application to display it.

"C:\\my dir\\my file.jpg" - works fine
"C:\\my dir\\my file(1).jpg" - does not work

Ho Hum - any ideas?