Tip

Suppress the output to a printer file via job switches

Here are the highlights of how to stop a printer file from printing without ripping out all the logics associated with that file.

1. In a CL program define the job switches

DCL        VAR(&SW) TYPE(*CHAR) LEN(8) 

2. Turn on/off the printing via the job switch (1=print, 0=don't print)

CHGVAR     VAR(&SW) VALUE('10000100')    /* default to print */              
IF         COND(&CMPY = '03' *OR &CMPY = '01') +       
             THEN(CHGVAR VAR(&SW) VALUE('00000000')) + 
             /*DON'T PRINT*/     

3. Submit the job with the switches

SBMJOB     CMD(CALL PGM(IM320R) PARM(&CMPY)) JOB(MANIFEST) SWS(&SW) 

4. In the RPG program modify the F specs for the printer files to match the job switches.

FIM320RPRO   F     132     OF     PRINTER                        U1 
FIM320RQRO   F     132     OF     PRINTER                        U6 

The key here is the U1 & U6 indicators. You can use U1 - U8, matching the 8 chars in the job switch. That is all that is needed to be done.


This was first published in May 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.