Re: Problem w/ RUN
Posted in 1995
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
In article <434shi$5ua@vivaldi.telepac.pt>, natal@telepac.pt (Joao Natal) writes: |> Hi There, |> |> Let's see if anyone has a clue that could help me with this one. |> |> Environment: SCO Unix 3.2.2 V4.2 + 4GL RDS 4.11.UC4 + SE 5.01.UD3 |> |> Example code: |> |> FUNCTION CopyTab() |> DEFINE cmd CHAR(255) |> |> ... |> code deleted |> ... |> |> LET cmd = "cp a b" |> |> RUN cmd |> |> ... |> code deleted |> ... |> |> END FUNCTION |> |> When the program gets to execute the RUN statment I get the error: |> : is not an identifier |> |> The variable cmd has the correct values, (I can see it w/ the debugger) |> but |> when RUN tries to execute it, the error comes up. |> |> I've substitued RUN with a call to a C function designed by me, |> which has always worked right, and I get the same error. |> |> I then created the following example: |> |> MAIN |> DEFINE cmd CHAR(200) |> |> LET cmd = "ls" |> |> RUN cmd |> |> CALL FGL_SYSTEM("ls") -- My C function |> END MAIN |> |> No problems with that one. |> |> Any ideas whatsoever are apreciated. |> |> Thanks in advance |> |> JN |> |> |> In my years of programming I have seen many problems that appear to be problems with code that turned out to be something totally different. In your first example you are trying to copy a file (filename 'a') to a new file (filename 'b'). Does file 'a' exist in the current directory?? Do you have write permission in the current directory?? I also noticed that the length of your define command is different in the two examples. I checked my v4.0 and v5.0 reference manuals and it appears to be no problem with the length of the variable. I do not have copies of the 4GL manuals at my desk, but you should check the RUN statement and make sure the length of the parameter you pass is at least 256 bytes. Hope this helps, good luck. --Mike -- +------------------------------------------------+ | Michael Goode UNIX Technical Support | | gsi Outsourcing Corp. (813) 664-6546 voice | | 6401 Harney Road (813) 664-6591 fax | | Tampa, FL 33610 goode@knk.com email | +------------------------------------------------+