PUT STREAM "stream name" CONTROL - Print Issue

aug333

New Member
Background - In the process of converting an old Unix/Progress 6 system over to a Windows/Progress 10.2 system. Printers: HP1320n.

Unix:
In outputing stream to a file the following line of code is used: put stream outfile control printr.cpi17. cpi17 is a table field that contains the following escape codes: \027&k2S which sets the stream to cpi17. When we imported this table into the Windows environment the values came across as : \\027&k2S.

Windows:
Per Progress documentation Windows uses ~ as an escape character instead of \. I have hardcoded all kinds of sequences as part of the STREAM CONTROL PROCESS and can't get anything to change the stream output. Example: PUT STREAM OUTFILE CONTROL "~027&k2S"

Tried ~&k2S. ~033&k2S to no avail.

Can anyone tell me what to pass to the stream to set it to cpi17?
 
This is Progress syntax for stream use.
Make it work for you:

DEFINE STREAM s1.

OUTPUT STREAM s1 TO cus.dat.

FOR EACH customer:
PUT STREAM s1 name "/".
END.

OUTPUT STREAM s1 CLOSE.
 

trx

Member
According to Progress help:
~nnn - A single character - Where nnn is an octal value between 000 and 377. All three digits are required.

Therefore sequence "~027&k2S" is incorrect, however "~033&k2S" should work. After you've sent improper sequences (like ~027) printer processing unit could have been blocked. Try turn off/on printer and reset printer before first page "~033E"
 

aug333

New Member
Many thanks to LarryD. The correct syntax was PUT STREAM OUTFILE CONTROL chr(27) "&k2S".

Fridays are better !
 
Top