Hi,
Can I check something... is a call to mf routine 'PC_PRINTER_OPEN' equivalent to OPEN OUTPUT my-printer-FD where my-printer-fd is...
SELECT my-printer-fd ASSIGN TO PRINTER organization is line sequential.
Historically I'm using a mix of std cobol and mf printer routines. I'd like to use PC_PRINTER_OPEN so that I can name the document or perhaps there's another way to change the std 'COBOL OUTPUT' name?
Thanks,
Linden
PC_PRINTER_OPEN provides more functionality than a standard open output as it allows you to choose the printer thru a Dialog where you can also set its properties. It also returns a handle that can be used along with the other PC_PRINT... routines. If you just wanted to change the printer name dynamically and still use the OPEN OUTPUT syntax then you would set the printer_redirection run-time tunable to true and then use the PC_PRINTER_DEFAULT_NAME call to set the printer to use prior to doing the open.
You can also return the printer handle when using the OPEN OUTPUT by calling the PC_PRINTER_REDIRECTION_PROC routine. You can then use the handle to set fonts, etc prior to printing.
                
     
                                    
            Hi,
Can I check something... is a call to mf routine 'PC_PRINTER_OPEN' equivalent to OPEN OUTPUT my-printer-FD where my-printer-fd is...
SELECT my-printer-fd ASSIGN TO PRINTER organization is line sequential.
Historically I'm using a mix of std cobol and mf printer routines. I'd like to use PC_PRINTER_OPEN so that I can name the document or perhaps there's another way to change the std 'COBOL OUTPUT' name?
Thanks,
Linden
Thanks Chris, it's not the printer name, I'm already using PC_PRINTER_DEFAULT_NAME, it's the document name i want to change because at the moment when printing to a pdf printer it's defaulting to name, 'COBOL OUTPUT'. How can I set the document name?
(Getting the handle with PC_PRINTER_REDIRECTION_PROC is useful to know though).
                
     
                                    
            Hi,
Can I check something... is a call to mf routine 'PC_PRINTER_OPEN' equivalent to OPEN OUTPUT my-printer-FD where my-printer-fd is...
SELECT my-printer-fd ASSIGN TO PRINTER organization is line sequential.
Historically I'm using a mix of std cobol and mf printer routines. I'd like to use PC_PRINTER_OPEN so that I can name the document or perhaps there's another way to change the std 'COBOL OUTPUT' name?
Thanks,
Linden
Sorry but I do not know of a method of setting the document name directly when using a simple OPEN OUTPUT statement.
                
     
                                    
            Hi,
Can I check something... is a call to mf routine 'PC_PRINTER_OPEN' equivalent to OPEN OUTPUT my-printer-FD where my-printer-fd is...
SELECT my-printer-fd ASSIGN TO PRINTER organization is line sequential.
Historically I'm using a mix of std cobol and mf printer routines. I'd like to use PC_PRINTER_OPEN so that I can name the document or perhaps there's another way to change the std 'COBOL OUTPUT' name?
Thanks,
Linden
Currently the document name is hard-wired to be 'Cobol Output' in the OPEN OUTPUT code, which is then passed to the StartDoc Windows API. In theory you can change the document name using the SetJob Windows API but to use that you need the job id returned by the StartDoc and that is not returned by the OPEN OUTUT. 
Sorry.