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



Marty

There is an attribute (DSPINPUT) on a parm that suppresses display of the parameter. *NO suppresses it both in a prompt and in a joblog.

Is that what you mean about a hidden field?

But qsh is its own shell and, as you say, does not show interactive commands.

You can execute 1 or more qsh commands from a CL -- qsh cmd('some command; some other command') - can you run the cl as a command processor, prompting for password and passing it to qsh this way?

Or go to the QShell books on shell scripts - but qsh is a pretty weak shell, does not have all hte bash or ksh, etc., have.

You might be better off with PASE, which has the full shell scripting possibilities. Need AIX or other UNIX docs for that.

HTH

Vern

At 11:30 AM 9/12/2003 -0400, you wrote:
I have a qsh script that I need to prompt the user for a password and do not
want to echo it to the screen. I am having a heck of a time finding a way to
do this. I tried:

1 - Making a command with a hidden field and calling it via "system", but
nothing appears on the screen when the command is called, regardless of
various selective prompting characters I tried. It is as if once qsh has the
screen, it has no way to relinquish control to anyone else.

2 - Making a CL and a DSPF with a hidden field and calling the CL via
"system", but same results as #1. It is as if the CL is being invoked but
its screem output goes nowhere.

3 - Using dynamic screen manager APIs. (Actually I never figured out how to
tell DSM not to echo the input chars, but it was a moot point because the
test didn't even get that far). I thought this would work for sure, but as
soon as qhell "system" calls the DSM program, it blows up with "CPD0772:
Program contains commands only valid when run interactively." Apparently it
thinks of my interactive qshell session as a batch job.

All of these tests work fine from the OS/400 command line but when I put
them in a shell script they don't.

4 - I didn't actually try it, but I was thinking of a simple C program to
accept the input, but I cannot come up with a C/400 function that will not
echo the input.

Does anybody have any ideas how to do this?

Thanks,
-Marty



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.