Help with CL to answer MSGW on printer WTR

75 pts.
Tags:
*SPLCTL
CL
MSGW
I have been out of programming for a few years, and am pretty rusty. We run a system that the end users have no command line access. Their printers have occasion to go into MSGW status (ie out of paper, etc.). They then have to call to get support to answer the MSGW on the WTR. I am hoping to be able to write a CL that will allow them to reset the printer themselves. (Not being lazy, it is work smarter, not harder.and I am trying to avoid the 2am phone calls) The end users have SPLCTL authority, so I do not believe that the CL will have to grant any special authority to answer the message. The specific message that we need to reply 'R' to is CPA403D.

Software/Hardware used:
AS/400 V5R4

Answer Wiki

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

Discuss This Question: 9  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
  • TomLiotta
    It seems almost contradictory to have users with *SPLCTL special authority and not also to have command line access. The main purpose of *SPLCTL is to give authority over all spooled file activities regardless of who owns them. Users always have authority to their own spooled files and don't need *SPLCTL for it.   The specific message that we need to reply 'R' to is CPA403D.   Do the users' writers have their own message queues? Or are you using QSYSOPR? How many writers are involved? What is the usual cause of the CPA403D?   Tom
    125,585 pointsBadges:
    report
  • pcoffin
    Tom, Thanks for the reply. All the writers are using QSYSOPR. There are a couple of writers that I will eventually do this on, but just one to start with. The usual cause is running out of paper.
    75 pointsBadges:
    report
  • TomLiotta
    Handling inquiry messages in QSYSOPR can be tricky.   First, authority to access QSYSOPR is needed, and the access must be high enough to change content. Second, only one program (one job) can allocate a message queue at a time; for a system message queue, that's a potential issue. Third, the program will be continually monitoring for messages, or will be processing every message every time it runs, or will attempt to handle only the specific intended message; those will have very different structures. (Technically, it will essentially handle every message every time it runs no matter which method is chosen, but there are implications that may be different for each.)   How will the program know when to send a reply? How should it know which CPA403D to reply to if two of them are available?   Do users have emulator sessions? If so, why can't they use <SysReq> option 6 to reply?   Tom
    125,585 pointsBadges:
    report
  • Splat
    I got around a similar problem by setting up system reply list entries to end the writers when certain messages (such as 'out of paper') appear in conjunction with a program to restart the writers every 30 minutes.  Cut down on a lot of late night calls.
    7,245 pointsBadges:
    report
  • TomLiotta
    Cut down on a lot of late night calls.   It can indeed cut down the number of calls, but it doesn't necessarily resolve the problem. It (partially) resolves a symptom.   It doesn't ensure that paper has been reloaded. It doesn't let anyone know that paper is out. It simply puts things into a loop until someone figures out what's going on. The writer either tries over and over without making progress or it ends and gets started later only to run into the same condition.   If nobody notices, there is no late-night call. If they do notice, they can be frustrated because they weren't told to load paper.   We need to know what circumstances pcoffin needs to handle if a truly useful resolution can be created. The system reply list might be useful. It depends on exactly what problem needs to be solved. If it's only reducing calls, that could be enough.   At least, that's how I see issues like this. Other interpretations are possible. Make sense?   Tom
    125,585 pointsBadges:
    report
  • Splat
    With rare exceptions the late night, printer related calls were requests to respond to the message in the QSYSOPR queue, the proximate cause of the message having been rectified.
    7,245 pointsBadges:
    report
  • pcoffin
    The printer is manned 24/7, and they check the paper regularly. They are also the ones that generate the print to the printer, so they know when there should be something printing. Over the past few weeks, the only error I have seen associated with it is the CPA403D.  I was hoping to be able to isolate the messages for WTR 'TWEETY' and just pay attention to them.
    75 pointsBadges:
    report
  • ToddN2000
    Another possibility might be to change the MSGQ for the OUTQ to the users OUTQ responsible for monitoring the writer "TWEETY"just a thought
    11,350 pointsBadges:
    report
  • TomLiotta
    I was hoping to be able to isolate the messages for WTR ‘TWEETY...   You can isolate to TWEETY first by assigning TWEETY to its own message queue. But even in QSYSOPR, the CPA403D message includes the device name beginning in position 31 of the message replacement data.   A system reply list entry can be added for CPA403D that explicitly applies only when a match for comparison data 'TWEETY' is found. If that works in your circumstances, nothing more might be needed.   Tom
    125,585 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