Device Printers

440 pts.
Tags:
AS/400 printing
CL
Hi friends, How can I create a CL to Start or End a printer device ? A command or CL like this: Start or End Printer Y or E ____ Option Name of the device printer ____ *devd Thanks for all.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You would write a CL program which, when &Start = ‘Y’ issues a STRPRTWTR command or if ‘E’ issues the ENDWTR command. If you felt up to it, you could also use APIs to find, and prompt the user, with a list of valid printer devices rather than making them type in/remember the device name.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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
  • SILVARB
    Below, the CL (not works) PGM PARM(&DEV) DCL VAR(&DEV) TYPE(*CHAR) LEN(10) DCL VAR(&MESAGE) TYPE(*CHAR) LEN(80) CHKOBJ OBJ(QSYS/&DEV) OBJTYPE(*DEVD) MONMSG MSGID(CPF9801) EXEC(DO) CHGVAR VAR(&MESAGE) VALUE('Impressora ' *CAT &DEV + *BCAT 'Nao existe, Confirme o nome da + Impressora') GOTO CMDLBL(END) ENDDO WRKCFGSTS CFGTYPE(*DEV) CFGD(&DEV) GOTO CMDLBL(END) END: ENDPGM
    440 pointsBadges:
    report
  • WoodEngineer
    Asking the user to remember system printer names can be a challenge. We wrote a command using the special value feature which allows the user to enter "AcctPrinter", "Marys Prt", etc. The replacement value sends the system name to the command processing program. The system allows 300 replacement values to be coded for a command parm which is probably enough for most.
    6,875 pointsBadges:
    report

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

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

Thanks! We'll email you when relevant content is added and updated.

Following