That's just the way the language works. I don't particularly like that
"feature", either. And no, you don't need to USE IO(0). Off the top of
my head, I can't think of any reason an application programmer would
need to reference IO(0).

Incidentally, when %ZIS was designed, the primary use for device output
was printing reports. If you ever need to use multiple devices, you
should look at ^%ZISUTL. I find these calls useful, for example, in
working with network devices.

--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:

> Greg,
>  
> Thanks for your help.
>  
> I don't understand why the use only works for the current line.... oh
> well.
> Do I need to put a U IO before every write in the REPORT function?
> If the system reverts to the home device on the next line, do I need
> to U IO(0)?
>  
> Thanks
> Kevin
> 
> 
> Greg Woodhouse <[EMAIL PROTECTED]> wrote:
> Very close. First of all, when you are done, you should close the
> device with
> 
> D ^%ZISC 
> 
> The other point is that USE only affects the current line.
> 
> U IO
> D REPORT
> 
> won't work. What you need is
> 
> U IO D REPORT
> 
> --- Kevin Toppenberg wrote:
> 
> > Hey all, 
> > 
> > I am writing a custom program to create a report. And
> > yes I know that templates would do this better, but I
> > don't have time to figure that system out right now.
> > 
> > So I have my function that prints out everthing to the
> > screen just the way I want it (using standard
> > 'writes',and no USE's anywhere). Next, I want to be
> > able to send it to a printer device.
> > 
> > So I 'do ^%ZIS'. Then I check for POP, and if
> > positive, I abort. I then 'use IO', and then I call
> > my function described above. I assume that all the
> > 'writes' should now go to the output channel, namely
> > the printer (IO). When I return from the function, I
> > 'use IO(0)' to restore the home device, and call
> > ^%ZISC.
> > 
> > But still, my output goes to the screen, and my
> > printer output is empty.
> > 
> > What am I doing wrong?
> > 
> > Thanks
> > 
> > Kevin
> > 
> > 
> > 
> > 
> > __________________________________ 
> > Do you Yahoo!? 
> > Read only the mail you want - Yahoo! Mail SpamGuard. 
> > http://promotions.yahoo.com/new_mail 
> > 
> > 
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real
> > users.
> > Discover which products truly live up to the hype. Start reading
> now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > Hardhats-members mailing list
> > Hardhats-members@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/hardhats-members
> > 
> 
> =====
> A practical man is a man who practices the errors of his forefathers.
> --Benjamin Disraeli
> ====
> Greg Woodhouse 
> [EMAIL PROTECTED] 
> [EMAIL PROTECTED] 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real
> users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Hardhats-members mailing list
> Hardhats-members@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 
>               
> ---------------------------------
> Do you Yahoo!?
>  Read only the mail you want - Yahoo! Mail SpamGuard.


=====
A practical man is a man who practices the errors of his forefathers. 
--Benjamin Disraeli
====
Greg Woodhouse 
[EMAIL PROTECTED] 
[EMAIL PROTECTED] 





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to