DEFINE PRINTER (N) OUTPUT 'xxx'

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

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

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?

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?