Name that printing file format - printing

Hello there fellow Stackers!
I wonder if anybody could tell me what the following file format is? If you print it as-is then your print out will be, er, as-is BUT if you send it directly to the printer (for example using NET USE in a DOS/Windows batch file) it will actually print a very nice Parcelforce posting label:
:Printer Setting...
WN
N
R0,0
N
I8,0,061
S2
D9
ZT
Q1242,020
:Carrier Logo...
GG50,1060,"BLOB400"
:Service Indicator...
A775,1160,2,A,1,1,N,""
LO530,975,290,4
LO530,975,4,232
:739 bullet (type 1)...
A125,1005,1,1,1,1,N,"739"
A455,1030,2,4,1,1,N,"PB PI3749824 001"
:Despatch Date...
A270,935,2,3,1,1,N,"Despatch Date/Day"
A270,915,2,3,1,1,N,"16/09/10, Thu"
:Address Info...
A795,915,2,4,1,1,N,"MR STACK OVERFLOW"
A795,885,2,4,1,1,N,"CPU LANE"
A795,855,2,4,1,1,N,"COMPUTER CASE"
A795,825,2,4,1,1,N,"UK "
A795,795,2,5,1,1,N,"90210"
:Parcel Number...
A460,980,2,4,1,2,N,"1"
A360,980,2,4,1,2,N,"1"
A400,980,2,4,1,1,N,"OF"
:Bar-coded Postcode...
B330,885,2,1,3,4,170,N,"*90210*"
Is it XPS or PCL or something? Printer-specific? Any thoughts or answers would be appreciated! Thanks guys.

I don't think it's XPS or PCL.
It appears to have a lot in common with HPGL.
I think I found it; it appears to be EPL.

Related

AT COMMANDS no answer (esp8266 f-12)

since I started working with my modules esp8266 F-12, I have found some strange behaviors. When I started programming the module using the serial monitor I had no problem, but when I do it automatically like ``````
wifi.println("AT+CWMODE=3");
delay(1000);
while(wifi.available()){
char car=wifi.read();
String info+=car
}
Serial.println(info);
Then, the module runs without printing nothing, but sometimes it does what I want him to d'o, but some other times is not doing anything until I send the command via serial. Has someone some Idea? Thanks
The AT-Command Set doc says "AT commands end with a new line (CR LF)".
Have you tried sending CR LF explicitly?
wifi.write("+++\r\n");

Sending IFS File to Outq Prints Line of "#" Symbols

I am attempting to send a file from IFS to an outq on our AS/400 system. Whenever I do, I get exactly what I send, as well as a line of "#" symbols of varying lengths appended to the end.
Here's the command I'm using:
qsh cmd('cat -c /path/test.txt | Rfile -wbQ -c "ovrprtf file(qprint)
outq(*LIBL/ABCD) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no)"
qprint')
The contents of test.txt is just Hello World!
The output I get when I send the command is
Hello World!####################################################################
I have not found any posts online about a similar problem, and have tried changing values and looking for additional switches to get it to work. Nothing I'm doing seems to fix the issue.
Is there a command or switch that I am missing, or is something I have in there already causing this?
EDIT:
I found this documentation which is the first time I've seen this issue mentioned, but it's not very helpful:
“Messages for a Take Action command might consist of a long string of "at" symbols (#) in a pop-up message. (The Reflex automation Take Action command, which is configured in situations, does not have this problem.) A resolution for this problem is under construction. This problem might be resolved by the time of the product release. If you see this problem, contact IBM Software Support.”
The only differences are: 1) this is not a pop-up message, it's printed. 2) I don't believe we use Tivoli Monitoring, although I could be wrong.
Assuming we do use Tivoli Monitoring, what would the solution be? There's no additional documentation past that, and I am not a system administrator, so I can't really make the call to IBM Software Support myself. And assuming we DON'T use it, what else could cause this issue?
I get different results, yet similar. I created a test.txt with Windows Explorer, put in Hello, world!, saved it and tried the script. I got gibberish for the 'Hello, world!' and then the line of # symbols.
My system is 7.3 TR5, CCSID 37 (US English) and my IFS file is CCSID 1252 (Windows English). Results did not change if I used a stream file of CCSID 819 (US ASCII).
I didn't have any luck modifying Rfile switches.
I found that removing devtype(*userascii) produced printed output in plain English without the # symbols. Do you really need *USERASCII? I would think that would be more for a pre-formatted 'print-ready' file like Postscript or the like.
EDIT: some more things to try
I don't understand why *USERASCII is adding those # symbols; it looks like a translation issue.
I tried this and still got the extra ###... You might have to play with the TOCCSID() parameter. Although a failure, it did give me an idea: what if those # symbols are EBCDIC spaces being sent as-is to the *USERASCII print stream? All we'd need is a way to send only the number of bytes in the stream file, without any padding.
CRTPF FILE(QTEMP/PRTSTMF) RCDLEN(132)
CPY OBJ('/path/test.txt') TOOBJ('/qsys.lib/qtemp.lib/prtstmf.file/prtstmf.mbr') replace(*yes)
ovrprtf file(qprint) outq(*LIBL/prt3812) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no)
cpyf prtstmf qprint
The data in QTEMP/PRTSTMF is in ASCII; DSPPFM shows that much. It also shows a bunch of spaces: after all, it is a fixed length file. My next step was to write an RPG program to read the stream file and print it, but Scott Klement already did that: http://www.scottklement.com/PrtStmf.zip
This works on my system:
ovrprtf file(qsysprt) outq(*LIBL/abcd) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no)
prtstmf stmf('/path/test.txt') outq(abcd)

How do I command the Rascal Shell not to truncate my output if it's quite long

This seems like a pretty basic question to me, but I don't seem to be able to find the answer anywhere. I need to get the full output of a command in the Rascal shell, however, Rascal seems to truncate long outputs automatically. Is there any way to tell the shell to always show the full output for a given command.
Example:
rascal>calculateCodeDuplication("smallsql0.21_src")
list[list[loc]]: [
[
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1310,26,<34,0>,<34,26>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1494,56,<43,1>,<43,57>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1558,49,<46,1>,<48,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1616,44,<51,1>,<53,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1665,57,<55,1>,<57,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1731,51,<59,1>,<61,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1791,57,<63,1>,<66,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1853,65,<68,1>,<71,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1927,61,<74,1>,<77,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1993,56,<79,1>,<82,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2055,50,<84,1>,<86,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2114,54,<88,1>,<90,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2177,42,<92,1>,<94,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2248,7,<96,24>,<96,31>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2225,136,<96,1>,<101,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2390,8,<103,24>,<103,32>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2367,153,<103,1>,<107,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2526,54,<109,1>,<111,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2586,51,<113,1>,<115,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2671,16,<118,27>,<118,43>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2645,78,<118,1>,<120,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2731,49,<123,1>,<125,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2789,48,<128,1>,<130,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2846,48,<133,1>,<135,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2902,46,<138,1>,<140,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2955,72,<143,1>,<143,73>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(3118,19,<149,43>,<149,62>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(3041,227,<146,4>,<152,5>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1340,1931,<36,0>,<153,1>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(0,3273,<1,0>,<153,3>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1305,26,<33,0>,<33,26>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1418,51,<38,4>,<38,55>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1477,123,<40,4>,<43,5>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1337,266,<36,0>,<44,1>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(0,1603,<1,0>,<44,1>),
|java+compilationUnit:///src/smallsql/junit/TestDBMetaData.java|(1298,23,<33,0>,<33,23>),
|java+compilationUnit:///src/smallsql/junit/TestDBMetaData.java|(1325,18,<35,...
(note that the console outputs cuts off in the middle of the line with ...)
There are a number of ways. Here are the two I use most frequently:
use iprintln or println from the IO module. The former does indentation which is nice for complex outputs. example: import IO; iprintln(calculateCodeDuplication("smallsql0.21_src")); The nice thing about this is that in the terminal values of loc type are hyperlinks
open an editor for the value using the util::ValueUI module (only in Eclipse), for example: import util::ValueUI; text(calculateCodeDuplication("smallsql0.21_src")); This will pop up an editor with the indented output value (nice to search in using CTRL+F, but the loc is not a hyperlink. Would love to have a contribution in that direction :-))
Caveat for the first one is that scrolling up and down in the Eclipse terminal is very slow on Mac's, and not really fast on Windows either.

How do you send a file separater in Mirth?

The HL7 receiver I am sending to is expecting a very specific end of file marker in a TCP Message:
<FS><CR>
Where <FS> is ascii 28 and <CR> is ascii 13.
We are using Mirth 2.x as our HL7 engine. The <CR> (Carriage Return) is fairly straight forward.
But how do I send the The File separator?
Here is how I was able to solve this problem.
In the source transformer I defined "Start of File" and "End of File" variables like this:
channelMap.put('SOF',String.fromCharCode(11)); // Start Of File: returns \v (vertical tab));
channelMap.put('EOF',String.fromCharCode(28,13)); // End Of File: returns <FS><CR>);
In the destination template I then did this:
${SOF}${message.encodedData}${EOF}
I wrote the messages out to temporary file and opened them in a Hex Editor. I was able to confirm that the a 0x0B (Ascii 11) was written prior to the message and the message closed with 0x1C 0x0D (Ascii 28, Ascii 13)
I'd recommend using the LLP Sender in Mirth. It can be configured to use different separator chars if needed.
My guess is that the two bytes you are seeing are the end of of segment and the end of message chars.

Zebra TLP 2844 printer refusing to print too many lines

I'm trying to print some vouchers with variable length on continuous paper. The problem is that the printer refuses to print anything beyond around 2300 points (approximately 26 cm or 10.4 inches) and just pretends it's not there. Very light code triggers the problem, so it's not a buffer issue. The printer also manages to read the "print" command and all the lines are formatted exactly the same, so it's not a formatting issue either. Here's a not quite minimal, but almost, example of code that illustrates my point:
N //clear buffer
Q10,0 //set paper to continuous mode with 10 points between documents
R0,0 //set reference point
ZT //print from top to bottom
A100,50,0,1,1,2,N,"ASDFQWERTY 50"
A100,100,0,1,1,2,N,"ASDFQWERTY 100"
A100,150,0,1,1,2,N,"ASDFQWERTY 150"
A100,200,0,1,1,2,N,"ASDFQWERTY 200"
A100,250,0,1,1,2,N,"ASDFQWERTY 250"
A100,300,0,1,1,2,N,"ASDFQWERTY 300"
A100,350,0,1,1,2,N,"ASDFQWERTY 350"
A100,400,0,1,1,2,N,"ASDFQWERTY 400"
A100,450,0,1,1,2,N,"ASDFQWERTY 450"
A100,500,0,1,1,2,N,"ASDFQWERTY 500"
A100,550,0,1,1,2,N,"ASDFQWERTY 550"
A100,600,0,1,1,2,N,"ASDFQWERTY 600"
A100,650,0,1,1,2,N,"ASDFQWERTY 650"
A100,700,0,1,1,2,N,"ASDFQWERTY 700"
A100,750,0,1,1,2,N,"ASDFQWERTY 750"
A100,800,0,1,1,2,N,"ASDFQWERTY 800"
A100,850,0,1,1,2,N,"ASDFQWERTY 850"
A100,900,0,1,1,2,N,"ASDFQWERTY 900"
A100,950,0,1,1,2,N,"ASDFQWERTY 950"
A100,1000,0,1,1,2,N,"ASDFQWERTY 1000"
A100,1050,0,1,1,2,N,"ASDFQWERTY 1050"
A100,1100,0,1,1,2,N,"ASDFQWERTY 1100"
A100,1150,0,1,1,2,N,"ASDFQWERTY 1150"
A100,1200,0,1,1,2,N,"ASDFQWERTY 1200"
A100,1250,0,1,1,2,N,"ASDFQWERTY 1250"
A100,1300,0,1,1,2,N,"ASDFQWERTY 1300"
A100,1350,0,1,1,2,N,"ASDFQWERTY 1350"
A100,1400,0,1,1,2,N,"ASDFQWERTY 1400"
A100,1450,0,1,1,2,N,"ASDFQWERTY 1450"
A100,1500,0,1,1,2,N,"ASDFQWERTY 1500"
A100,1550,0,1,1,2,N,"ASDFQWERTY 1550"
A100,1600,0,1,1,2,N,"ASDFQWERTY 1600"
A100,1650,0,1,1,2,N,"ASDFQWERTY 1650"
A100,1700,0,1,1,2,N,"ASDFQWERTY 1700"
A100,1750,0,1,1,2,N,"ASDFQWERTY 1750"
A100,1800,0,1,1,2,N,"ASDFQWERTY 1800"
A100,1850,0,1,1,2,N,"ASDFQWERTY 1850"
A100,1900,0,1,1,2,N,"ASDFQWERTY 1900"
A100,1950,0,1,1,2,N,"ASDFQWERTY 1950"
A100,2000,0,1,1,2,N,"ASDFQWERTY 2000"
A100,2050,0,1,1,2,N,"ASDFQWERTY 2050"
A100,2100,0,1,1,2,N,"ASDFQWERTY 2100"
A100,2150,0,1,1,2,N,"ASDFQWERTY 2150"
A100,2200,0,1,1,2,N,"ASDFQWERTY 2200"
A100,2250,0,1,1,2,N,"ASDFQWERTY 2250"
A100,2300,0,1,1,2,N,"ASDFQWERTY 2300"
A100,2350,0,1,1,2,N,"ASDFQWERTY 2350"
A100,2400,0,1,1,2,N,"ASDFQWERTY 2400"
A100,2450,0,1,1,2,N,"ASDFQWERTY 2450"
A100,2500,0,1,1,2,N,"ASDFQWERTY 2500"
A100,2550,0,1,1,2,N,"ASDFQWERTY 2550"
A100,2600,0,1,1,2,N,"ASDFQWERTY 2600"
A100,2650,0,1,1,2,N,"ASDFQWERTY 2650"
A100,2700,0,1,1,2,N,"ASDFQWERTY 2700"
A100,2750,0,1,1,2,N,"ASDFQWERTY 2750"
A100,2800,0,1,1,2,N,"ASDFQWERTY 2800"
A100,2850,0,1,1,2,N,"ASDFQWERTY 2850"
A100,2900,0,1,1,2,N,"ASDFQWERTY 2900"
A100,2950,0,1,1,2,N,"ASDFQWERTY 2950"
A100,3000,0,1,1,2,N,"ASDFQWERTY 3000"
P1
There's a blank line before the first "N", as specified in the EPL2 manual (http://www.zebra.com/content/dam/zebra/manuals/en-us/printer/epl2-pm-en.pdf). I also don't include comments when sending the commands to the printer. However, this only prints until the line that says "ASDFQWERTY 2300" and ignores everything beyond that. Any help is greately appreciated.
Answering myself from a support email I got from the company. This printer model is limited to 11 inches, so in the end I had to split the document onto several requests.

Resources