Basics of batch job monitoring, production support - part 2

 Hi AS400 aspirants !

Well this blog is actually a continuation of my last post, if you haven't read that I'd recommend you going through that first and come back again on this post. 

Here's the link to my previous post https://sortedibmi.blogspot.com/2020/12/basics-of-batch-job-monitoring.html 

Today we will try to understand - How we can find out if there is any issue or any job in MSGW. before we dive into that, let me first explain you what is MSGW (Message Wait status), In RPGLE, CLLE, there are standard exception handlers. ( We will talk about what's an exception handler in next post) if any command operation goes into error. 

But, what if the programmer did not add any exception handler in the program itself, at that instance system will jump in and say, ''hey programmer, you have a piece of code that is not behaving as you intended, could you please check ?" That's essentially how you get a MSGW status for a Job.

So, let's go back to our original discussion, and find out ways if any job is in MSGW status.

Commands that can come in handy are - DSPLOG, DSPJOBLOG, WRKJOB, DSPMSG.

DSPLOG- Will show you the entire logs for all the things that your AS400 is or was or has been doing, one of the good feature of DSPLOG command is you can filter date and time as to which date or what time you want to investigate something.

DSPJOBLOG - Will show you job log information of particular job, in simple words it will show you what are the steps of instructions that the program did before there was an error for your specified job only.

WRKJOB - this is another way to work with the job in error or MSGW, WRKJOB will open tray of options for you, for beginners I would recommend you explore option 1- basic details like date and time of job when it entered sub system, 4- show any report or spool if generated, 10-show steps tha the program was doing, 11- call stack, 14- file related things.

DSPMSG- Will display all the messages that are waiting for reply by any operator.

Use the above 4 commands as per your convenience and become an expert in production support !

As a general rule of thumb I can suggest being a production support guy has its own advantages, you become proficient in looking at details for any issue, you understand importance of time while handling critical jobs.

That's all for job monitoring, next time we will try to explore exception handling for CL and RPG programs. 

I would love to hear your thoughts on my approach and suggestions for any future topics in comment section.

Comments

Popular posts from this blog

Basics of batch job monitoring, production support of AS400