You can put the CD command and the 7z command both in your &CMD variable.
Just separate the commands with a semicolon. So your &CMD variable would
contain
'CD /usr/local/bin/p7zip/; 7z a -sfx7z.sfx /home/ziggy/archive.exe
/home/ziggy/oldstuff/ -pPassword'
HTH,
Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi
Young i Professionals
http://www.youngiprofessionals.com
"Chris Bipes" <chris.bipes@xxxxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
06/09/2009 02:30 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc
Subject
7-zip in PASE
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?
Chris Bipes
Director of Information Services
CrossCheck, Inc.
707.586.0551, ext. 1102
707.585.5700 FAX
chris.bipes@xxxxxxxxxxxxxxx
www.cross-check.com
Notice of Confidentiality: This e-mail, and any attachments thereto, is
intended only for use by the addressee(s) named herein and may contain
legally privileged and/or confidential information. If you are not the
intended recipient of this e-mail, you are hereby notified that any
dissemination, distribution or copying of this e-mail, and any
attachments thereto, is strictly prohibited. If you have received this
e-mail in error, please immediately notify me by e-mail (by replying to
this message) or telephone (noted above) and permanently delete the
original and any copy of any e-mail and any printout thereof. Thank you
for your cooperation with respect to this matter.
As an Amazon Associate we earn from qualifying purchases.