× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I think I would like to see your rpg use of Qp2RunPase() please.

Upon further inspection, I determine that Qp2RunPase() will also bring up the "stdout/stderr" screen. The difference, however, seems to be that it doesn't wait for the user to press enter afterwards.

Here's a copy/paste from one of my programs. This subprocedure is intended for unzipping a .ZIP file that has a password (using the Info-Zip software running in PASE)

      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      * Unzip():  Unzip a file (uses the open source Info-Zip package
      *                         with a little help from PASE )
      *
      *     peFile = (input) IFS pathname of file to unzip
      * pePassword = (input) Password used to decrypt the file
      *
      * Returns *ON if successful, *OFF otherwise
      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     P Unzip           B
     D Unzip           PI             1N
     D   peFile                    1024A   varying const
     D   pePassword                  32A   varying const

     D Qp2RunPase      PR            10I 0 extproc('Qp2RunPase')
     D   pathName                      *   value options(*string)
     D   symbolName                    *   value options(*string)
     D   symbolData                    *   value
     D   symDataLen                  10U 0 value
     D   ccsid                       10I 0 value
     D   argv                          *   dim(32767) options(*varsize)
     D   envp                          *   dim(32767) options(*varsize)

     D UNZIP_PROGRAM   C                   '/usr/local/bin/unzip'

     D parms           s            256A   dim(5)
     D argv            s               *   dim(6)
     D envp            s               *   dim(1)

     c                   eval      parms(1) = UNZIP_PROGRAM + x'00'
     c                   eval      parms(2) = '-qq'         + x'00'
     c                   eval      parms(3) = '-P'          + x'00'
     c                   eval      parms(4) = pePassword    + x'00'
     c                   eval      parms(5) = peFile        + x'00'

     c                   eval      argv(1) = %addr(parms(1))
     c                   eval      argv(2) = %addr(parms(2))
     c                   eval      argv(3) = %addr(parms(3))
     c                   eval      argv(4) = %addr(parms(4))
     c                   eval      argv(5) = %addr(parms(5))
     c                   eval      argv(6) = *NULL
     c                   eval      envp(1) = *NULL

     c                   if        Qp2RunPase( UNZIP_PROGRAM
     c                                       : *NULL
     c                                       : *NULL
     c                                       : 0
     c                                       : 819
     c                                       : argv
     c                                       : envp ) <> 0
     c                   return    *OFF
     c                   endif

     c                   return    *ON
     P                 E

Thinking about it further... if you really wanted to suppress stdout/stderr, etc,you could use the spawn() API and connect stdin/stdout/stderr with pipes back to the program that issues the spawn.

That way, you could read the output into your program instead of having them output to the screen.

While doing my testing, if the file exists, the copy happens correctly.  I
wanted to see what would happen if there was a problem.  So I renamed my
from file but left my command the same.  The screen tells me file not found,
but the log file contains the information about CP.

Hmmm... that's weird. Maybe if it's a local copy (i.e. there's no colon in the target filename parameter) the scp command will simply call cp under the covers.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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.