I have a COBOL program that sends the output to an out queue to be picked up by another (external to IBM i) program for formatting and printing. Well, now, there is a need to send the data for one particular customer to a second out queue instead of out queue "A".
Coming in to the program, the CL that calls it does OVRPRTF on multiple options (number of copies for example). The only thing I have to change is the out queue: if it is customer "B" change the out queue to "B" otherwise, continue to use "A".
In short, it doesn't work. I've looked online and through programs on our system, and haven't had any luck. I've moved the "CLOSE" statement to before the "IF" statement, but that didn't help. Is it because the printer is "QPRINT"? Does that matter? Any hints will be greatly appreciated. Thank you.
Coming in to the program, the CL that calls it does OVRPRTF on multiple options (number of copies for example). The only thing I have to change is the out queue: if it is customer "B" change the out queue to "B" otherwise, continue to use "A".
In short, it doesn't work. I've looked online and through programs on our system, and haven't had any luck. I've moved the "CLOSE" statement to before the "IF" statement, but that didn't help. Is it because the printer is "QPRINT"? Does that matter? Any hints will be greatly appreciated. Thank you.
PHP Code:
SELECT PRINTER-FILE
ASSIGN TO PRINTER-QPRINT
FILE STATUS IS PRT-STATUS.
********** ER0016588 START OF CHANGE*******************
01 WS-QCMDEXC-FIELDS.
05 CL-CMD-LE0000 PIC X(38)
VALUE 'OVRPRTF FILE(QPRINT) OUTQ(B)'.
05 CL-CMD-OTHER PIC X(38)
VALUE 'OVRPRTF FILE(QPRINT) OUTQ(A)'.
05 CL-CMD_LENGTH PIC 9(10)V9(5) COMP-3
VALUE 38.
05 CL-FIRST-TIME PIC X(01).
********** ER0016588 END OF CHANGE *******************
4400-PRINTER-OVERRIDE.
IF OHR-CUST-ACCT = 'LE0000'
CALL 'QCMDEXC' USING CL-CMD-LE0000 CL-CMD_LENGTH
ELSE
CALL 'QCMDEXC' USING CL-CMD-OTHER CL-CMD_LENGTH.
CLOSE PRINTER-FILE.
OPEN OUTPUT PRINTER-FILE.
Comment