WHAT IS THE COMMAND TO AUTOMATICALLY START HCON PRINTER?
ITEM: RTA000042248
QUESTION:
My customer has successfully installed and configured sna services
and hcon with their mainframe. However, we have not been able to
automate the printscreen function from cics. The rs/6000 system
administrator logs on as the hcon user and starts the users hcon printer
session (ie, e789pr p). The session just hangs their with no return
of a command line. When the user from another 3270 display session
uses the printscreen key from a cics application, it does successfully
print on the rs/6000 printer. This printer session has been setup as
an LU3 on both the host and rs/6000.
Question: How can we automatically start this users hcon printer
session without logging on? Secondly, why does the e789pr command
seem to hang? Ideally, we would like to start this users hcon printer
sessions at system startup time. Is this possible?
---------- ---------- ---------- --------- ---------- ----------
A: Based on the information you have provided, I believe that HCON
is functioning normally. I will address your questions in the
order you asked them:
Q: How can we automatically start this users hcon printer session
without logging on?
A: To start a user's HCON printer session at system startup time,
without the user having to log in, place the following command at
the end of the /etc/rc.hcon file:
su hconuser -c "e789pr p &"
where "hconuser" is the AIX login name of a valid HCON user, and
"p" is the identifier for an HCON printer session defined for
"hconuser".
Q: Why does the e789pr command seem to hang?
A: The e789pr command is designed to run in the background. More
generally, HCON printer sessions are not interactive, which is
why you do not see a command line in the HCON printer session
window. Use the syntax "e789pr p &".
---------- ---------- ---------- --------- ---------- ----------
QUESTION:
The command you gave to put in the hcon.rc file worked, except you need
the hyphen after the su (for the user's environment).
Question: I don't understand why you need the -c flag for the su
command. If you put this in the background with a &, wouldn't this
accomplish the same thing?
---------- ---------- ---------- --------- ---------- ----------
A: The -c flag enables you to use the su command to execute a single
command (and then exit) under a particular user ID as opposed to
opening an interactive shell under a particular user ID.
The exact syntax of the su command is:
su . - . . Name . Argument ... . .
where "Argument" is a parameter that relates to the login shell
defined for the user specified by the Name parameter. This argument
is passed to the specified user's login shell. For example, if the
login shell for the user is /usr/bin/ksh, you can include any of the
flags for the ksh command, such as the "-c " flag. When the
su command runs, it passes the "-c " flag to the ksh command.
When the ksh command runs, the "-c " flag causes ksh to read
commands from the variable, rather than stdin.
If you do not specify the "-c " flag, the su command will
attempt to open an interactive Korn shell.
---------- ---------- ---------- --------- ---------- ----------
This item was created from library item Q658999 CRJXF
Additional search words:
APPLIC APPLICATION CICS COMMUNICATIO CONFIGURING CRJXF HCON IX MAY94
OZNEW PRINT PRINTABLE PRINTER PRINTING PRINTSCREEN PRT RISCSNA
RISCSYSTEM SESSION SNA SOFTWARE
WWQA: ITEM: RTA000042248 ITEM: RTA000042248
Dated: 11/1996 Category: RISCSNA
This HTML file was generated 99/06/24~12:43:17
Comments or suggestions?
Contact us