CPF1240/CPF1241: Job ended abnormally/normally.
Who hasn't had a "file full" message in QSYSOPR? It's about as common as a cold. But what do you do with the message? Always the same reaction? What about the QSYSOPR job end abnormally and normally messages, CPF1240 and CPF1241? They're nice to know for certain jobs, but for most jobs, you don't care. When a certain job ends, do you want to execute a command, restart the job, notify someone, or do something else?
The QSYSOPR message queue is filled with a lot of messages. You need conditional (IF?THEN?ELSE) processing to manage some of them. Conditional processing uses variables such as the time of day, day of the week, job name, user name, file name, or library name to continue processing. Think about all of the programming you might need!
OPAL to the Rescue with No Programming
Robot/CONSOLE, the message management and resource monitoring software, offers OPerator Assistance Language (OPAL), a macro language that handles conditional processing. OPAL's logic lets you perform actions based on different occurrences.
Here's an example of how to respond to the CPA5305 "file full" message:
IF &VAR2 EQ PAYLIB/PAYFILE1
PAGE ONCALL
ELSE
IF &VAR2 EQ CUSLIB/CUSTMST1
ENTER I
PAGE ONCALL
END
In this example, &VAR2 is the name of a file (or the message data &2 when you look at the CPA5305 message using the Display Message [DSPMSGD] command). The page (PAGE) operation can send an email, text, or pager message. If a CPA5303 (file full) message arrives for the payroll file, Robot/CONSOLE sends a page to the on-call staff without extending (expanding) the file. However, if the same file full message arrives for the customer file, it automatically extends the file (the result of the I in the ENTER operation) and pages the on?call staff.
You could code additional actions. For example, you can use OPAL to count the number of times you extend a file and then notify someone after a specified number of extensions.
Do you want to know if a job ends? With OPAL, you can use conditional processing with the CPF1240 and CPF1241 messages to automate notification when an important job ends. You decide when to notify. This OPAL example reads the CPF1241 message (normal end of job):
*If job is a TCP job, restart it
IF JOB EQ TCP
EXECUTE SBMJOB CMD(CALL PGM(TCP))
*If job is a JDEdwards job, send an SNMP trap to the enterprise monitor
ELSE
IF JOB EQ JDEJOB
RBCSNDSMP
ELSE
SUPPRESS
END
In the first case, Robot/CONSOLE OPAL executes a command to restart the job; in the second case, it converts the event to an SNMP trap that works with your enterprise monitor.
You can control and manage QSYSOPR! The key is Robot/CONSOLE. Try Robot/CONSOLE free for 30 days and see how you'll save money, time, and effort. And check out Help/Systems other offerings in the MC Showcase Buyer's Guide.
as/400, os/400, iseries, system i, i5/os, ibm i, power systems, 6.1, 7.1, V7,
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online