×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.





Here is how to do it with a Windows API call.  Not exactly what you asked
for, but it may work for you.

-- Scott Johnson


    *  Copy PC File
     D $CpyPCF         PR             5I 0
     D  Source                      255A
     D  Target                      255A
     D  Overwrite                    10I 0 Value
      *===================================================================*
      *      Copy PC File                                                 *
      *-------------------------------------------------------------------*
      *
     P $CpyPCF         B                   EXPORT
      *
     D $CpyPCF         PI             5I 0
     D  Source                      255A
     D  Target                      255A
     D  Overwrite                    10I 0 Value
      *
     D CopyFile        PR            10I 0 ExtProc('CopyFileA')
     D                                     dll('Kernel32.dll')
     D                                     LinkAge(*StdCall)
     D  Source                      255A
     D  Target                      255A
     D  Overwrite                    10I 0 Value
      *
     C                   Eval      Source = %Trim(Source) + Null
     C                   Eval      Target = %Trim(Target) + Null
     C                   Eval      apiRC =
CopyFile(Source:Target:Overwrite)
      *
      *  Check the api Return Code.
     C                   If        apiRC <> *Zeros
     C                   Eval      ProcRC = *Zeros
     C                   Else
     C                   Eval      ProcRC = 1
     C                   EndIf
      *
     C                   Return    ProcRC
      *
     P $CpyPCF         E





How can I call an MS-DOS command from VA-RPG?  Will QCMD do this from me?
System?  Is it possible?

I need to copy a file using MS-DOS in VA-RPG.  I can probably do this in
VA-RPG, but in this case I would like to use the DOS call since the file is
open by another workstation.

Thanks.

Regards,

Jim Langston





This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.