Skip to main content

This is very much related to another discussion I started, but I don't want to muddy the waters in that conversation so I'm starting this new one.

I'm not certain, but I think this will pertain specifically to the HP/Troy printer we're using.

The last line on the the page, which is a remittance advice with check at the bottom, is the MICR line that includes the check number, transit (routing) number, and account number.

As a simple test I execute the following statement after setting the print queue:

LIST PERSON \\
  ID.SUP HDR.SUP COL.SUP COUNT.SUP \\
  SAMPLE 1 \\
  EVAL "CHAR(027):'(0Q':'C35353C A123456789A 87654321C'" \\
  LPTR

According to a Troy rep, embedding a 'C' and 'A', tells the printer to generate On-US  and Transit symbols, respectively.

And though that's correct, it appears to also be introducing line-feeds (in odd positions no less), as here is a screenshot of the result:

This would appear to be doing what I need except for those apparent line-feeds.

Anyone have any suggestions?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

This is very much related to another discussion I started, but I don't want to muddy the waters in that conversation so I'm starting this new one.

I'm not certain, but I think this will pertain specifically to the HP/Troy printer we're using.

The last line on the the page, which is a remittance advice with check at the bottom, is the MICR line that includes the check number, transit (routing) number, and account number.

As a simple test I execute the following statement after setting the print queue:

LIST PERSON \\
  ID.SUP HDR.SUP COL.SUP COUNT.SUP \\
  SAMPLE 1 \\
  EVAL "CHAR(027):'(0Q':'C35353C A123456789A 87654321C'" \\
  LPTR

According to a Troy rep, embedding a 'C' and 'A', tells the printer to generate On-US  and Transit symbols, respectively.

And though that's correct, it appears to also be introducing line-feeds (in odd positions no less), as here is a screenshot of the result:

This would appear to be doing what I need except for those apparent line-feeds.

Anyone have any suggestions?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

I've never seen anyone try to print a MICR line using the output of the LIST statement. It doesn't seem like you've got enough control over the printer.

That said, it's not your statement that's causing the line feeds. It could be something in the printer settings or term settings that are inserting them every 10 characters.  If we include CHAR(27) as a character and represent it with an "E", you're sending this:

E(0QC35353C A123456789A 87654321C

If you insert a line feed at every 10th character you'll get this:

E(0QC35353
          C A1234567
                    89A 876543
                              21C

The reason your first line looks shorter is because the printer is interpreting the ESC(0Q as an escape sequence and not actually printing it.

So, something is inserting the line feed into the stream you're sending to the printer. On Linux you can set up conversion programs like unix2dos that do things like change line feeds to linefeed/carriage returns. You might have something screwy set up there that's adding those line feeds.

You might want to post more information as to what OS and Database version you're using. The solution will probably depend on that.



------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------

This is very much related to another discussion I started, but I don't want to muddy the waters in that conversation so I'm starting this new one.

I'm not certain, but I think this will pertain specifically to the HP/Troy printer we're using.

The last line on the the page, which is a remittance advice with check at the bottom, is the MICR line that includes the check number, transit (routing) number, and account number.

As a simple test I execute the following statement after setting the print queue:

LIST PERSON \\
  ID.SUP HDR.SUP COL.SUP COUNT.SUP \\
  SAMPLE 1 \\
  EVAL "CHAR(027):'(0Q':'C35353C A123456789A 87654321C'" \\
  LPTR

According to a Troy rep, embedding a 'C' and 'A', tells the printer to generate On-US  and Transit symbols, respectively.

And though that's correct, it appears to also be introducing line-feeds (in odd positions no less), as here is a screenshot of the result:

This would appear to be doing what I need except for those apparent line-feeds.

Anyone have any suggestions?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

I wonder if it is as simple as Universe defaulting to 10L for eval dictionaries.  I would try the following and see if it helps.

LIST PERSON \\
  ID.SUP HDR.SUP COL.SUP COUNT.SUP \\
  SAMPLE 1 \\
  EVAL "CHAR(027):'(0Q':'C35353C A123456789A 87654321C'" FMT 25L \\
  LPTR



------------------------------
Joseph von Arx
Software Developer
Data Management Associates Inc DMA
Cincinnati OH US
------------------------------

I wonder if it is as simple as Universe defaulting to 10L for eval dictionaries.  I would try the following and see if it helps.

LIST PERSON \\
  ID.SUP HDR.SUP COL.SUP COUNT.SUP \\
  SAMPLE 1 \\
  EVAL "CHAR(027):'(0Q':'C35353C A123456789A 87654321C'" FMT 25L \\
  LPTR



------------------------------
Joseph von Arx
Software Developer
Data Management Associates Inc DMA
Cincinnati OH US
------------------------------

Joseph,

That could be a good call I suspect.
It's also worth sending the output to a hold file and checking the contents in hex to see what the data holds, rather than just what it looks like.

Regards

JJ



------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------

I've never seen anyone try to print a MICR line using the output of the LIST statement. It doesn't seem like you've got enough control over the printer.

That said, it's not your statement that's causing the line feeds. It could be something in the printer settings or term settings that are inserting them every 10 characters.  If we include CHAR(27) as a character and represent it with an "E", you're sending this:

E(0QC35353C A123456789A 87654321C

If you insert a line feed at every 10th character you'll get this:

E(0QC35353
          C A1234567
                    89A 876543
                              21C

The reason your first line looks shorter is because the printer is interpreting the ESC(0Q as an escape sequence and not actually printing it.

So, something is inserting the line feed into the stream you're sending to the printer. On Linux you can set up conversion programs like unix2dos that do things like change line feeds to linefeed/carriage returns. You might have something screwy set up there that's adding those line feeds.

You might want to post more information as to what OS and Database version you're using. The solution will probably depend on that.



------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------

Thanks Joe.

We're running UD8.2.4 on RHEL8.10 and managing queues with CUPS:

I set the printer like so:    SETPTR ,132,60,3,3,1,DEST TRS1,NFMT

...and then run the LIST statement. And you're probably right about not having enough control, but I was doing this in an attempt to get me started on the right track. I was surprised that it actually worked (even if only partially).



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

I wonder if it is as simple as Universe defaulting to 10L for eval dictionaries.  I would try the following and see if it helps.

LIST PERSON \\
  ID.SUP HDR.SUP COL.SUP COUNT.SUP \\
  SAMPLE 1 \\
  EVAL "CHAR(027):'(0Q':'C35353C A123456789A 87654321C'" FMT 25L \\
  LPTR



------------------------------
Joseph von Arx
Software Developer
Data Management Associates Inc DMA
Cincinnati OH US
------------------------------

Interesting.

Thank you, Joseph.

I will give this a try as soon as soon as possible.



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------


Joseph,

That could be a good call I suspect.
It's also worth sending the output to a hold file and checking the contents in hex to see what the data holds, rather than just what it looks like.

Regards

JJ



------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------

...checking the contents in hex...

Thanks John.

What's a good method of doing this?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

I wonder if it is as simple as Universe defaulting to 10L for eval dictionaries.  I would try the following and see if it helps.

LIST PERSON \\
  ID.SUP HDR.SUP COL.SUP COUNT.SUP \\
  SAMPLE 1 \\
  EVAL "CHAR(027):'(0Q':'C35353C A123456789A 87654321C'" FMT 25L \\
  LPTR



------------------------------
Joseph von Arx
Software Developer
Data Management Associates Inc DMA
Cincinnati OH US
------------------------------

Boom!

It's on to the next step...printing it at the bottom of the page without messing up the check/advice details.

Thanks again, Joseph.



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

...checking the contents in hex...

Thanks John.

What's a good method of doing this?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

Shawn,

As this is Unix: od -cx <hold file>|more

Regards

JJ



------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------

Shawn,

As this is Unix: od -cx <hold file>|more

Regards

JJ



------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------

Thanks again, John!



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------