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
Software/Hardware used:
ASKED:
May 19, 2008 9:09 PM
UPDATED:
May 23, 2008 3:58 PM
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…
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.