× 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.



Change your &CMD to look like this (you may have to make &CMD bigger)

CHGVAR VAR(&CMD) +
VALUE('cd /usr/local/lib/p7zip && 7z' +
*BCAT &ACTION +
*BCAT '-sfx7z.sfx' +
*BCAT '"' +
*TCAT &ZIPFIL +
*TCAT '" "' +
*TCAT &SRCFIL +
*TCAT '"' +
*BCAT &ZIPPWDCMD )


Chris Bipes wrote:
I have this running by using the command QSH
Once the shell is open I CD to /usr/local/bin/p7zip
Then I can run the command
7z a -sfx7z.sfx /home/ziggy/archive.exe /home/ziggy/oldstuff/ -pPassword
And it create a password protected window executable zip file.

If I do not CD first, and path the command I receive an error that
resources are not available.

If I remove the -sfx7z.sfx and change the extension .zip, all works
fine.

My problem is how can I get this to work from a CL program. I can
create the .zip file but get the same error as I do when I do not do the
CD first.

/* Create command string for qsh */
CHGVAR VAR(&CMD) +
VALUE('7z' +
*BCAT &ACTION +
*BCAT '-sfx7z.sfx' +
*BCAT '"' +
*TCAT &ZIPFIL +
*TCAT '" "' +
*TCAT &SRCFIL +
*TCAT '"' +
*BCAT &ZIPPWDCMD )
CHGVAR VAR(&CMDZ) + VALUE(&CMD *TCAT &NULL) CD DIR('/usr/local/lib/p7zip')
QSH CMD(&CMDZ)
It works without the -sfx7z.sfx option from the CL just fine.

How can I get the CD /usr/local/lib/p7zip to happen after I evoke the
QSH command? Is there an environment variable that needs to be set? Do
I have to create some sort of batch file with the command passing the
necessary parameters?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.