Nat 1586: More Printer issues

Seems I have clobbered`something, printing used to work, but now it gives me this same error 1586.
Here is what I know: I have a separate Natparm setup for batch, and in Device assignments I have LPT1, LPT2, LPT3, LPT4 for LOGIcAL DEVICES, CLOSE MODE=80, LINEdSIZE=80, PAGE SIZE=66, MAXPAGE=32767,
For the PHYSICAL assignment I have also LPT1, LPT2, LPT3, LPT4,
The LPT1,2,3,4 relate to scripts that exist in /Scripts and look like this:

#!/bin/sh
cat > $HOME/PrintJobs/LPT2.rpt
lp -d systems $HOME/PrintJobs/LPT2.rpt
exit 0

So, I execute a pgm in Natural that writes like this:
define printer (2)
WRITE (2) ‘SYSTEMS PRINTER’
this returns an error 1586.
printing from a shell command works, but not from the write command.
I am missing something or I forgot something…
guess I need to go back and reread some of my earlier posts,
take a refresher course or something,
This is the shell command that works,
call “shcmd” “lp -d systems /usr/sag/PrintJobs/LPT2.rpt”

can someone point me in the right direction or give me things to check,
thanks

I figured it out,
Seems I had changed my NATPARM where instead of having the peth to the scripts LPT1,2,3,4 etc, I just had LPT1 LPT2 LPT3 LPt4 , so I changed it to point tk the script which exists at /usv/sag/Scripts/LPT1 and voila itsfixed again…
Must be getting old,
I don’t remember changinf it…
:shock:

One more question if anyone is listening,

As I mentioned above, I can print with a bash script which does use a different Natparm=NATBATP, where LPT4 Logical Device is printing via a script…
What I also need to do is be able to print straight from Natural without using a script, in other words, just using a define printer and write statement, but I want to be able to route my printouts to one of about a hundred printers which will be selected via input parameter. Here is my simple program which still results in a Nat1586. My online Natural uses Natparm=NATPARM where logical device is LPT2 and Physical Device is defined the same way as NATBATP, as a script that exists
at /usr/sag/Scripts/LPT2

Define printer(2) output ‘LPT2’
FORMAT (2) LS=133 PS=60
WRITE (2) 'SYSTEMS TEST ’
END

Any suggestions on how I can get this accomplished?
Examples appreciated.
thanks…