Internet PLC Forum

General => Technical support => Topic started by: philipjoseph on January 27, 2003, 12:19:34 PM

Title: APPEND
Post by: philipjoseph on January 27, 2003, 12:19:34 PM
Hi,
I have these funtions:

CusFn#1
IF DATE[2]>9 AND DATE[3]>9
H$= STR$(DATE[2])+"/"+STR$(DATE[3])
ENDIF
IF DATE[2]<10 AND DATE[3]>9
H$= "0"+STR$(DATE[2])+"/"+STR$(DATE[3])
ENDIF
IF DATE[2]>9 AND DATE[3]<10
H$= STR$(DATE[2])+"/0"+STR$(DATE[3])
ENDIF

dCusFn #2
PRINT #1 "<APPEND M3"+H$+".txt>"
PRINT #1 "RUNNING ";B$;" ";G$;" ";F$;" ";STR$(A,4)
PRINT #1 "</>"

But it doesn't open a new file with M3+date.txt
Where is the problem?
Title: Re: APPEND
Post by: support on January 27, 2003, 01:50:27 PM
I ran a simulation of your functions and obtain the followin output from COMM1:

<APPEND M301/27.txt>
RUNNING    0000
</>

I doubt the Windows O/S can recognize the forward slash sign. You could change your program and simulate it using the simulator to see what is the output and find out why it may not work.
Title: Re: APPEND
Post by: philipjoseph on January 28, 2003, 01:59:41 AM
I simulate the program and also obtain the output at the COMM1
<APPEND M301/28.txt>
RUNNING W/CLASP  NO PAPER 07:51 07:50 0000 000 00000 000
</>
However, when the program is not openning the file M301/28.

Also, I ran the on-line monitoring and check the value of h$ and is correct (01/28).
Philip
Title: Re: APPEND
Post by: philipjoseph on January 28, 2003, 02:47:10 AM
iI also checked the hard disk if the file was created in a different folder, but it is no created at all.
Philip
Title: Re: APPEND
Post by: support on January 28, 2003, 06:25:39 AM
Remove the "/" from the file name and try again. "/" cannot be part of a file name.