CL doesnt work

440 pts.
Tags:
AS/400
CL
STRPRTWTR
I have a CL/400 and i have a problem when I try start a device printer with the command STRPRTWTR, in many situations this devices not exist on the system, How can I resolve this situation ?, below the CL. QNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 .. 100 PGM 200 DCL VAR(&IMPRES) TYPE(*CHAR) LEN(10) 300 DCL VAR(&MSG01) TYPE(*CHAR) LEN(70) 400 DCLF FILE(SUPORTE/TLSERVDESK) 500 P100: SNDRCVF RCDFMT(REG02) 600 CHGVAR VAR(&MSG) VALUE(' ') 700 CHGVAR VAR(&MSG01) VALUE(' ') 800 900 IF COND(&IN03 = '1') THEN(SIGNOFF) 000 100 IF COND((&IMPRES = ' ' *AND &CRIUS = 'N') *or + 200 (&IMPRES = ' ' *AND &CRIUS = 'Y')) + 300 THEN(GOTO CMDLBL(MENS03)) 400 500 IF COND((&IMPRES ^= ' ' *AND &CRIUS = 'N') *OR + 600 (&IMPRES ^= ' ' *AND &CRIUS = 'Y')) + 700 THEN(GOTO CMDLBL(STRIMP)) 800 GOTO CMDLBL(P100) 900 000 MENS03: CHGVAR VAR(&MSG) VALUE('Campo ''IMPRESSORA'' Deve + 100 ser Preenchido''') 200 GOTO CMDLBL(P100) 300 400 strimp: 500 600 MONMSG MSGID(CPF3347) 700 STRPRTWTR DEV(&IMPRES) 800 GOTO CMDLBL(P100) 900 000 END: ENDPGM

Answer Wiki

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

Hi,

Your MONMSG is BEFORE the STRPRTWTR command, this should be AFTER the STRPRTWTR command. I would also advise using DO and ENDDO instead of so many GOTOs.

Regards,

Martin Gilbert.

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
  • Tpinky
    Some printers, if the devices does not show, is a Remote writer. What command do you use on the command line that starts the printer? STRPRTWTR or STRRMTWTR? I would try the command on the command line first, verify it works, then place it in the CL. Also, I agree with Martin for moving the MONMSG to after you are issuing the command and using the DO and ENDDO. Tpinky...
    4,165 pointsBadges:
    report
  • WoodEngineer
    We have many writers attached to our system via TCP/IP which have no device descriptions. For these writers we use STRRMTWTR. It works well. Been doing this about 10 years. For writers with a device descrition we use STRPRTWTR.
    6,510 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