Thanks for your help everyone. I don't have this working yet, but I figured out one obvious problem I was overlooking.
My code was not hanging at the USE IO command. It's just that all my debugging comments, that I had put in the code to see what was going on, were now being sent to the output file (duh!). So what I have now is that the note IS being printed to the file, but then the process keeps adding white space to the end of the file so that it grows indefinately. I noticed this by looking at the file while it was "hung". The file kept growing--as big as 28 mb! So I have changed my debug comments to look like this: U $P write "//kt Starting loop. TIUDA=",TIUDA,! U IO And I can once again follow the code. I have traced the problem to the function: . D PRNTDOC^TIURA(TIUPMTHD,.TIUDARR) It is not returning from this, that I can tell. I'll post later if I figure out the problem. Thanks Kevin --- Lloyd Milligan <[EMAIL PROTECTED]> wrote: > A couple of additional thoughts.. You don't need to > open the file. ^%ZIS* > does that. Also, I noticed the DEVICE definition > doesn't include open > parameters. For GT.M try > (NEWVERSION:VARIABLE:NOREADONLY). Again, these > ideas probably do not directly relate to the > problem, but it might be > helpful to improve the DEVICE definition a little > and then simplify the > background printing experiment. > > Lloyd > > ----- Original Message ----- > From: "Lloyd Milligan" <[EMAIL PROTECTED]> > To: <hardhats-members@lists.sourceforge.net> > Sent: Wednesday, January 12, 2005 4:54 PM > Subject: Re: [Hardhats-members] Printer IO problems > > > > Normally if a device or file isn't open you would > expect an error, not an > > indefinite hang. From your previous Email, Kevin, > the device is defined > > as TYPE: TERMINAL. This should be HFS, not > TERMINAL. But I doubt this > > relates to the problem. > > > > Since TIU prints in the background I would suggest > using some simple test > > of background printing to troubleshoot. You say > it works from FileMan. > > Does it work when queued from FileMan? > > > > Lloyd > > > > ----- Original Message ----- > > From: "Kevin Toppenberg" <[EMAIL PROTECTED]> > > To: "Hardhats Sourceforge" > <hardhats-members@lists.sourceforge.net> > > Sent: Wednesday, January 12, 2005 12:34 PM > > Subject: [Hardhats-members] Printer IO problems > > > > > >> Well, as per my other post, I thought I had the > >> printers working. In fact they do work when I > print > >> reports from fileman. But they are not working > with > >> the TIU package properly, specifically the > option: > >> TIUP PRINT PROGRESS NOTES, which is an action > entry > >> that goes to MAIN^TIUPRD() > >> > >> When I trace through this, I find that I am > hanging at > >> the line: > >> U IO > >> > >> When VistA gets to this point, it hangs > indefinately > >> (until I stop the job with MUPIP stop xxxx) > >> > >> By inserting a line to write out IO first, I find > that > >> IO="/tmp/PringJobFile1234.dat" -- I.e. the file > that > >> will eventually be sent to the linux print system > >> after being filled with data. > >> > >> So this must be a problem with the way my DEVICE > file > >> entry is set up... specifically the way I am > setting > >> up IO. > >> > >> Again as a review, in the PRE-OPEN EXECUTE field > >> (.19.7) in the DEVICE file, I call a funtion that > >> changes the value of IO to the filename I want. > I > >> thought that perhaps I needed to OPEN IO, so I > added > >> that, with no improvement. > >> > >> > >> So, what would cause M to hang on a USE IO > statement? > >> > >> Thanks > >> Kevin > >> > >> > >> > >> > >> > >> > >> __________________________________ > >> Do you Yahoo!? > >> The all-new My Yahoo! - Get yours free! > >> http://my.yahoo.com > >> > >> > >> > >> > >> > ------------------------------------------------------- > >> The SF.Net email is sponsored by: Beat the > post-holiday blues > >> Get a FREE limited edition SourceForge.net > t-shirt from ThinkGeek. > >> It's fun and FREE -- well, > almost....http://www.thinkgeek.com/sfshirt > >> _______________________________________________ > >> Hardhats-members mailing list > >> Hardhats-members@lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/hardhats-members > >> > > > > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by: Beat the > post-holiday blues > > Get a FREE limited edition SourceForge.net t-shirt > from ThinkGeek. > > It's fun and FREE -- well, > almost....http://www.thinkgeek.com/sfshirt > > _______________________________________________ > > Hardhats-members mailing list > > Hardhats-members@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/hardhats-members > > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the > post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt > from ThinkGeek. > It's fun and FREE -- well, > almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Hardhats-members mailing list > Hardhats-members@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hardhats-members > __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members