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




Thank you, Michael! I am going to post your process snippet for the PGP
encryption as it helped solve my issues. I tried another way of using the
|| with echo "..."... > to file and 2> /dev/null to pipe errors and output
from the terminal to a file and nothing to no avail. Well, it did what it
was supposed to but I still kept getting that annoying terminal session
with the prompt for pressing enter to end the terminal session. I thought
it was supposed to replace the ADDENVVAR's. The only way to keep that
terminal screen from popping up was to do those ADDENVVAR's. I think I
have to make sure I adopt some authority in case the user doesn't have
*JOBCTL but it works and should be okay in batch.

Craig

---- Micheal wrote:
<OFF LIST>

Here's what I do...

CHGVAR VAR(&OUTTXT) VALUE('/tmp/PGP' *CAT &WKJOBNUM +
*CAT '.wrk')

/* Perform PGP Encryption */
/* pgp -e <file to encrypt> */
/* <recipient's key> */
/* -o <encrypted file name> */

CHGVAR VAR(&OUTPGP) VALUE('/tmp/PGP' *CAT &WKJOBNUM +
*CAT '.pgp')

CHGVAR VAR(&QSHCMD) VALUE('echo y | pgp -e +force' +
*BCAT &OUTTXT *BCAT &QUOTE *CAT +
'keyname' *CAT &QUOTE *BCAT '-o' *BCAT +
&OUTPGP)

ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE) +
REPLACE(*YES)
ADDENVVAR ENVVAR(QIBM_QSH_CMD_ESCAPE_MSG) VALUE(Y) +
REPLACE(*YES)

QSH CMD(&QSHCMD)
MONMSG MSGID(QSH0005 QSH0006 QSH0007) EXEC(DO)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA('PGP +
Command Failed. Process aborted...') +
MSGTYPE(*INFO)

- Michael

On Tue, May 27, 2008 at 1:12 PM, <craigs@xxxxxxxxx> wrote:

I can run commands which prompt for input fine from QSH but trying
commands
or a script from CL with any prompting causes iSeries Access to blow up
and
then I have to end all my sessions.
PCSCM.exe blows up then I have to end go to Task Manager and end
PCSWS.exe
(iSeries Access) as all sessions lock up. If I don't end the
PCSWS.exe's,
I can't get back into iSeries Access. I don't actually see the prompt
but
if I pipe the output to a file, I see the prompt it is trying to display.
I also get a terminal session every time I run this from a CL and I have
to
press enter which I don't really want.

In particular, I'm trying to run the PGP freeware executable for required
encryption of files for the FTP. The only trouble I am having is adding
this to a CL and it tries to prompt. I have been running this
interactively fine until it tries to prompt. The first prompt was about
wondering whether to trust the public key (y/n). I got around this by
creating my own signature and signing their key. The next prompt was
about
the ciphertext file already existing and wondering whether to replace. I
think I can get around this by always trying to delete before running. I
don't want to try my luck and get to a point where there is some other
prompt and it blows the user entirely out of the water. I know I have
done
this before using a different command fine but maybe it didn't have any
prompting. I can't recall if that terminal window kept popping up when I
did it before. I know my previous implementation of QSH did something
like
QSH CMD('/QOpenSys/bin/scp...<file>.csv&& echo "<file>.csv successfully
sent."

Any ideas? Thanks!
Craig

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.