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



Scott Klement wrote:

Thanks for the answer, first of all.


I tried your script, and it worked for me. (FreeBSD 6.0-RELEASE-p5, i5/OS V5R3M0)

It works for me too, meaning it starts the daemon. The real problems are that, once started, it won't do what it should and sooner or later die.




I noticed that you're using an old-style rc.d script. Are you running a very old version of FreeBSD? Which version are you running?

Not at all. It's 6.1p6/amd64.
I simply copied another script. Maybe this is not as good with regards to style, but it works.
Nothing's really wrong with it, is it?




Also, is there a reason to put all of the options into the script itself instead of creating a configuration file? Wouldn't it be easier to create a tn5250rc and put all of the options there?

Again, no reason. I thought this way was easier, but I might be wrong.
If it can change something, I will try it the other way.




Now lp5250d starts on boot, but I cannot print anything through as400.
Notice i can print anything with lpr, so that part of the setup is ok.

Okay... Is there any errors on the AS/400 side? Where do you have the messages for this printer going to? Have you looked for any error messages? Is there a job log produced? What does the job log say?

Sigh!!! Problem is I don't administer this AS/400. In fact I know almost nothing on this architecture.
Do you know of any straight howto which would lead me to check this out?

Would it suffice (or even help) if I asked the admin to delete this printer (which was created client-side running lp5250d) and start again?

In fact it worked the first two or three times...




Second problem is that the daeomon will sooner or later die without
issuing any message.
I could solve this by letting svscan run it, but I would need some
switch to tell lp5250d not to fork in background. Does such a switch exist?

I'm not familiar with svscan. Is that something you installed from ports?

Yes, it's part of deamontools.
Basically it runs any deamon you like and starts it again if it dies.
It's very useful when some program is not that stable.
In this case, it would start lp5250d again after it exits, thus solving part of the problem.
It need however some switch to prevent it from going into background.
Then again this part of the problem might be the consequence of the other half...



There's no switch to stop it from running as a daemon. If you look in the code for lp5250d, you'll see the following code. If you comment that code out, it'll stay in the foreground:

      if (tn5250_daemon (0, 0, 0) < 0)
        {
          perror ("tn5250_daemon");
          exit (2);
        }

I could add a +nodaemon config option, that'd be a trivial change to the code. Then you'd have it in a future release...

If it's not a problem, I think it would be useful.
Right now I could modify the code by hand, as you suggested. This, in case I can get it to work, anyway.



Is there any way to increase verbosity in order to get something useful
in the log file?

The trace file is intended to keep a log of every byte of sent/received from the AS/400 as well as every keystroke you make. That way, a developer can use it to reproduce problems with the 5250 data stream.

Unfortunately, in your case, it doesn't look like you're getting that far. There's no data exchanged between your FreeBSD box and your AS/400. This implies that you're not connecting successfully, or that the AS/400 is unable to provide a device for you to use.

As for the connection, I can only tell that terminal emulation through tn5250 works.
I'll ask the admin if he sees anything on the other side.



 bye & Thanks
        av.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.