# DEFINE PRINTER (N) OUTPUT 'xxx'

**URL:** <https://techcommunity.softwareag.com/t/define-printer-n-output-xxx/75790>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [December 3, 2007, 6:37pm UTC](https://techcommunity.softwareag.com/t/define-printer-n-output-xxx/75790 "2007-12-03T18:37:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pidipius](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@pidipius](https://techcommunity.softwareag.com/u/pidipius)\
**Post date:** [December 3, 2007, 6:37pm UTC](https://techcommunity.softwareag.com/t/define-printer-n-output-xxx/75790/1 "2007-12-03T18:37:38Z")

</div>

Hello,  
I’d like to use this syntax:  
DEFINE PRINTER (N) OUTPUT ‘xxx’  
And then I use ‘USP0001N’ to check printer allocation. Unfornatelly if ‘xxx’ printer is allocated to any other stream - DEFINE PRINTER… doesn’t work - the logical printer allocatedo to n-stream is unchanged.  
How to omit that problem?  
Please help.

pid

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [December 3, 2007, 9:51pm UTC](https://techcommunity.softwareag.com/t/define-printer-n-output-xxx/75790/2 "2007-12-03T21:51:38Z")

</div>

Verify that the DEFINE PRINTER statement is executed - this automatically closes the previous stream, or use the CLOSE PRINTER statement.

See the documentation - [http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat424mf/sm/closepri.htm#closepri](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat424mf/sm/closepri.htm#closepri)

---

<div class="post-metadata">

**Author:** ![pidipius](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@pidipius](https://techcommunity.softwareag.com/u/pidipius)\
**Post date:** [December 4, 2007, 12:22pm UTC](https://techcommunity.softwareag.com/t/define-printer-n-output-xxx/75790/3 "2007-12-04T12:22:38Z")

</div>

Thanks for Your answer, but it doesn’t help me.  
We use 3.1.6 Natural version.  
I’ll give You an example:

1. After USP0001N :

CALLNAT USP0001N ENDED WITH RETURN CODE 0000  
MAX. NUMBER OF PRINTERS : 31  
WRITE ( 1 ) : LPF2  
WRITE ( 2 ) : LPF2  
WRITE ( 3 ) : LPF2  
WRITE ( 4 ) : LPF3  
…

1. Then:  
DEFINE PRINTER (4) OUTPUT ‘LPF2’

2. And USP0001N :

CALLNAT USP0001N ENDED WITH RETURN CODE 0000  
MAX. NUMBER OF PRINTERS : 31  
WRITE ( 1 ) : LPF2  
WRITE ( 2 ) : LPF2  
WRITE ( 3 ) : LPF2  
WRITE ( 4 ) : LPF3

But I expect: WRITE ( 4 ) : LPF2

1. But after  
DEFINE PRINTE (4) OUTPUT ‘AAAA’
2. I got:USP0001N :

CALLNAT USP0001N ENDED WITH RETURN CODE 0000  
MAX. NUMBER OF PRINTERS : 31  
WRITE ( 1 ) : LPF2  
WRITE ( 2 ) : LPF2  
WRITE ( 3 ) : LPF2  
WRITE ( 4 ) : AAAA

How to solve that problem?

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [December 4, 2007, 11:23pm UTC](https://techcommunity.softwareag.com/t/define-printer-n-output-xxx/75790/4 "2007-12-04T23:23:56Z")

</div>

NAT316 has been out of support since June 2005 on the mainframe. If there is an issue with USP0001N, you will need to upgrade to correct it.

- are the output devices AAA, LPF3 defined?
- can you  
DEFINE PRINTER (4) OUTPUT ‘AAA’  
and immediately after  
DEFINE PRINTER (4) OUTPUT ‘LPF2’  
?
- is the output actually redirected correctly or not? Is the problem with USP0001N reporting the allocations incorrectly or is the output being directed incorrectly?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:48pm UTC](https://techcommunity.softwareag.com/t/define-printer-n-output-xxx/75790/5 "2021-04-02T14:48:58Z")

</div>


