File open output and assign to printer works fine but need to add contents from a binary file running on Redhat

Here is my select statement for a file used as printer handling

 


SELECT PRINT-FILE
ASSIGN TO PRINTER "prt109"
FILE STATUS IS ERR-STATUS.


FD PRINT-FILE
RECORD CONTAINS 132 CHARACTERS
LABEL RECORDS ARE OMITTED.

01 PRT-BUFFER.
    10 PL PIC X(132).

I have an environment statement of 

dd_prt109=>lp -dprt109 -s -oraw

 

Writing out records to this file and then doing a close works just perfectly, however I need to add in contents from an existing file which happens to contain some binary data and is much larger than my print file definition.  As such I cannot just read one line at at time from the binary file and inset to the print file.

 

Any suggestions?

 

Parents
  • The record length depends on your definition and not the file itself. The creator of the file might define it as x bytes / record, you however can define it as y Bytes / record. This way you can read the creators records as chunks of the size you define and process it as you wish.
    Maybe I do not understand you correctly. If you can make the file you are talking about available for me, I can be of further assistance.
Reply
  • The record length depends on your definition and not the file itself. The creator of the file might define it as x bytes / record, you however can define it as y Bytes / record. This way you can read the creators records as chunks of the size you define and process it as you wish.
    Maybe I do not understand you correctly. If you can make the file you are talking about available for me, I can be of further assistance.
Children
No Data