[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] call system not executing dos commands
Hello Scotty,
Try in SQR using this (transformed from your code) under NT/2000/XP :
Your version was :
LET $cmd = getenv('COMSPEC') || ' /c copy "' || $file1 || '" "' || $file2||
'"'
New version can be :
LET $cmd = 'CMD /C @START /WAIT /MIN copy "' || $file1 || '" "' || $file2||
'"'
You can also call a .BAT file that actually does the COPY job, etc...
Please refer to the Windows help to get information about the START command.
This is not available
on 9x/Me, but it did help me running programs from SQR.
Hope this helps...
Charly
--- Scotty Barnes <sbarnes@wesleyan.edu> a écrit : >
> Hello,
>
> If I copy this into START - RUN and execute it I get the desired results.
> (Windows 2000, SQR 6.2)
>
> C:\WINNT\system32\cmd.exe /c copy
> "e:\psoft\temp\atticus\From_follett\8100084.*"
> "e:\psoft\temp\atticus\From_follett\Inputfiles.20030825010841
>
> But if I execute this procedure I made
>
>
> !**************************************************
> ! copy($file1,$file2,:#status)
> ! $file1 must be fully qualified
> ! $file2 does not need to be
> !**************************************************
> Begin-Procedure wes_dos_command_copy($file1,$file2,:#status)
> LET $cmd = getenv('COMSPEC') || ' /c copy "' || $file1 || '" "' ||
> $file2|| '"'
> CALL SYSTEM USING $cmd #status WAIT
> show 'Inside WES_DOS_COMMANDS.sqc -> Executed:'$cmd
> End-Procedure copy($file1,$file2,:#status)
>
> by using this code:
> do wes_dos_command_copy($temp,$combined_in,#status)
> show 'appended files :'#status
>
> I get this in my log file.
>
> Inside WES_DOS_COMMANDS.sqc -> Executed:C:\WINNT\system32\cmd.exe /c copy
> "e:\psoft\temp\atticus\From_follett\8100084.*"
> "e:\psoft\temp\atticus\From_follett\Inputfiles.20030825010802"
> appended files :1.000000
>
> If I copy this above line an paste it into the START RUN on Windows 2000
> server environment I get what I am expecting. But it does not work when
> running in SQR.
>
> What am I doing wrong?
>
> Scotty
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users