auto start job from 5250 device

stevebowdoin
stevebowdoin used Ask the Experts™
on
I have a 5250 terminal in a repair shop.   Physical security is enough for this task.  I need the system to start a job for a default user id when the device is powered on or the subsystem starts.
I have read and I have tried “ADDWSE SBSD(QINTER) WRKSTN(SHOP*) JOBD(QGPL/SHOP)”.
If have bounced QINTER.
I have specified a device name in the Client Access session.  The proper name is displayed on the sign on screen.
Still no go.
OS at V6R1.
I have attached prints of the userprf, jobd and sbsd.

What am I missing?
Thanks
Steve Bowdoin

QPRTJOBD196382.txt
QPRTSBSD196388.txt
QPUSRPRF196382.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gary PattersonVP Technology / Senior Consultant

Commented:
Steve,

Are you wanting some sort of "auto-login"?  If so, I don't know of an easy way to do this from the AS/400 side.  The whole point of login security is to force the user to log in before a job goes active.   5250 workstation allocation and login works like this:

1) Subsystem is started.  Devices are allocated based on workstation name entries for specific names, then generic names, and then types.
2) Once a WS is allocated to a subsystem, the Signon Display associated with that subsystem is displayed on the workstation.
3) When a user successfully authenticates, the appropriate job is started based on the JOBD specified in the WSE for the SBS.

This means that until a user logs in, you cannot start an interactive job on a workstation.

Sort of.

What you can do is use a little PC-side scripting to perform the logon for you.  Lots of ways to do this, but assuming you are using CLient Access, you can use the Client Access command CWBLOGON to cache logon information for a certain user (put it in the user's startup script, for example).  Then, as long as "Bypass signon" is allowed by system value, starting the Client Access session will automatically log them in.  Whatever signon program is associated with the AS/400 profile will then run.

With other emulators, you can use common scripting capabilities, or a general-purpose scripting program like AuthHotkey to simulate a user login.

- Gary Patterson
I have a 5250 terminal in a repair shop. ...and... I have specified a device name in the Client Access session.

Those are technically somewhat mutually exclusive unless the Client Access session is established through something like a PC twinax card. That is, do you have a direct-attach "terminal"? Or is it a "Client Access session" over a network? Since you also said "Physical security is enough for this task", the direct-attach idea seems reasonable because a session over a TCP/IP network interface pretty much excludes "physical security".

So, let's think in terms of telnet rather than a direct-attach terminal (and ignore "physical security"). Most likely you'd be thinking of TN5250E with bypass-signon being used. One important part of the "E" in "TN5250E" is the ability to send profile/password along with the connection request. If bypass-signon is enabled, then the job simply starts up as soon as the connection is accepted. No signon display is shown. An initial program would initiate whatever you want to be run.

And there is an alternative.

You can have an auto-start job in QINTER. That job can check the device status for a SHOP* device to see if it's varied on. (It'd probably be ideal if it showed as being at a signon display.) When it finds the device sitting at signon, it's obviously safe for the auto-start job to use it.

At that point, the job can 'acquire' the device and open a display file on it. A CL program might use the OVRDSPF DEV() parameter; RPG would use the ACQ op-code; COBOL would use an ACQUIRE statement. A simple DSPF and a trivial CL program can be written in a few minutes to get ideas on how that part works.

The auto-start job could loop around a delay until the device status showed available and start running when the PC session connected. Or a "bypass-signon" setup with an initial program could do mostly the same thing as soon as the PC establised the session connection.

What exactly are you wanting to happen?

Tom

Author

Commented:
Ouch.  2 out of my 4 heroes are stumped.

This page describes what I want to do:
http://systeminetwork.com/article/69-as400-tips-techniques-part-2
Look for “Starting Up with a Menu”.

What I want to happen is on these special devices, if the enter key is pressed with no user id it will call a specified program and display a screen.

I have done the ADDWSE but something is wrong.

Steve

Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Gary PattersonVP Technology / Senior Consultant

Commented:
Steve,

Don't think I've seen this particular feature before.  Interesting.  Took some looking, but I found this feature documented in the V5R1 Work Management Guide on page 133, heading "USER Parameter and Interactive Jobs".

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c4153063.pdf

Note that the feature is only available on systems running QSECURITY under 40.  Any chance your system is at 40 or 50?

- Gary



Author

Commented:
Gary

My machine is at 40.  I will have a test machine that I can change to 30 in a day or two.  I don't think that is the problem but I will test it.

Steve
I haven't had a system below 40 for quite a few years. I had a mental impression that that feature was dropped a few releases back, but maybe it was only the QSECURITY restriction that put it out of mind. Also, it's not clear how this would work for telnet rather than for devices directly attached to a controller -- especially if a telnet exit program is active.

If it can't be made to work with QSECURITY 30, verify the existence (and behavior) of any telnet exit programming first. Also, review QAUDJRN for any entries created at times of failure. Then ask IBM.

Tom
Gary PattersonVP Technology / Senior Consultant
Commented:
Steve,

IBM pretty clearly documents that the feature exists, and that it doesn't work at QSECURITY 40 and higher.  It only took a moment to find the V7R1 documentation link that describes the same feature, with the same restriction: QSECURITY=30 or lower only:

http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=/rzaks/rzaksjobdescnsecurity.htm

- Gary Patterson

Author

Commented:
Rats.
I changed my old 800 from a 40 to a 30.  It works.
I WILL NOT change my customer’s machine to a 30 just for this.
Gary, thanks for telling me “NO”, that won’t work anymore.
Tom, thanks for the “acquire” suggestion.  Heck if I can get that to work they won’t even have to press enter…

Steve

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial