MSGW on my system I7

Posted on 2011-10-26
Last Modified: 2012-05-12
I have this MSGW status for this job and typed all of the replys but it won't go away?

Message ID . . . . . . :   RNQ0112       Severity . . . . . . . :   99        
Message type . . . . . :   Inquiry                                            
Date sent  . . . . . . :   10/25/11      Time sent  . . . . . . :   14:39:55  
Message . . . . :   Date, Time or Timestamp value is not valid (C G D F).    
Cause . . . . . :   RPG procedure BWR_WRKORD in program BLUEW/BWR_WRKORD, at  
  statement 768 referenced a Date, Time or Timestamp variable which contained
  a value which is not valid.  Some examples of values which are not valid    
    -- A date of 1994/02/31, which is not possible.                          
    -- A time of 01/03:04, which does not have correct separators.            
Recovery  . . . :   Contact the person responsible for program maintenance to
  determine the cause of the problem.                                        
Possible choices for replying to message . . . . . . . . . . . . . . . :      
 D -- Obtain RPG formatted dump.    
S -- Obtain system dump.            
F -- Obtain full formatted dump.    
C -- Cancel.                        
G -- Continue processing at *GETIN.                                          
Question by:HBMI
    LVL 13

    Expert Comment

    If you answer D to the message, then a dump will be produced that will help resolve what field is in error.
    If a subsequent message appears, then you can cancel using C or perhaps I to ignore if skipping this program step makes sense from overall job standpoint.

    Failing that, you can always cancel the job from Work Active Jobs WRKACTJOB, using option 4, but this should not be required.


    Author Comment

    I have done D, S, F, C, G and restarted the job but still goes to MSGW.
    LVL 18

    Expert Comment


    It's pretty simple, isn't it? The program tried to write a date that wasn't formatted correctly. You could answer the message with a "C" to cancel the job, but you might have to do a "C" a few times to get out of the whole program stack.

    Then, the task becomes finding the source of the invalid data and fixing it.

    LVL 13

    Expert Comment

    The problem is likely in the data. When the job is submitted again, the same error will occur if the problem is in a file itself. If so, you need to find out which record in the file is causing the problem. Check the dump for this information.


    Author Comment

    How do I check the dump?  Sorry not too savy with all of this.  I will try c a few more times.
    LVL 34

    Accepted Solution

    This is typically a problem that a programmer would resolve.  Do you have an AS/400 programmer that can help you?  If the problem happens every time you restart the program, then there is -probably- some invalid data in a file that is being processed by this program, and the problem will continue until someone corrects the data problem in the underlying file.   To do this, you must:

    - Identify the failing line of code (line 768).
    - Review a compiler listing of the program, and/or the dump produced, and determine the source of the invalid data.
    - Correct the invalid data and re-run the job.  Bear in mind that it is not always safe to just simply restart a program that terminated abnormally.  Sometimes, a failing program may produce partial results that need to be rolled back or corrected, or files need to be restored or reloaded, or other steps taken to properly rest the system to allow the job to be re-run.

    This is why it is a good idea to engage a programmer that is familiar with the system and process.

    It would also be a good idea, if possible, to modify the program to handle this error condition gracefully if it happens again in the future.

    When you take option "D", a dump will appear in the spooled files of the job in question.  The spooled file will be named QPPGMDMP.  The dump contains a lot of information about what was happening in the program at the time of the error, including:

    - What files were open.
    - The status of those files, including the contents of the file IO buffers.
    - The contents of all of the variables in the program.

    Since the error makes it clear that the problem is in line 768 of the program (that is the line number from the compiler listing), and that it is due to bad Date/Time/Timestamp information, it shouldn't be too hard to figure out.  If you recompile that program and look at the listing, you will be able to quickly see what line of code has the problem.

    Here is some documentation on reading a dump:

    Consider using Navigator to convert the dump to a text file and post the dump here for the experts to review.  Here's how to do that:

    - Gary Patterson

    Author Comment

    Line 768 reads

    Clear             phname30
    LVL 34

    Expert Comment

    by:Gary Patterson
    A CLEAR operation on what I would guess is a 30-byte alphanumeric field (I'm just guessing based on the field name) cannot generate that error.  I'm guessing that you are looking at line 768 in SEU, and not the compile listing.

    Recompile the module, and look at the listing that is generated.  You want listing line 768, not source line 768.

    Also suggest you post that dump.

    - Gary Patterson
    LVL 26

    Expert Comment

    Also, you shouldn't be entering any reply other than 'C' or 'D' for that message. You really don't want to be replying with 'S' (to any message, unless IBM asks you to.)

    Note that either reply might simply be handled by the programming in such a way that the failing program gets called again in the job. Without knowing the programming in the job, there's no way to be certain what the behavior will be.

    A 'C'ancel reply will cancel a program, but won't necessarily end the entire job. Previous suggestions on ending the job are the best choices once a 'D'ump has been obtained.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now