[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2358
  • Last Modified:

How do I force an RPG formatted DUMP on decimal data error?

I have an AJE job in a subsystem that errored out last night:


                    Additional Message Information                        
                                                                               
 Message ID . . . . . . :   RNQ0907       Severity . . . . . . . :   99        
 Message type . . . . . :   Inquiry                                            
 Date sent  . . . . . . :   04/08/06      Time sent  . . . . . . :   00:04:23  
                                                                               
 Message . . . . :   Decimal-data error occurred (C G D F).                    
 Cause . . . . . :   RPG procedure ONTIME in program PROACTIVE/ONTIME found a  
   decimal-data error at statement 974. A packed or zoned value does not        
   contain valid numeric data.  A digit and/or sign is not valid.              
 Recovery  . . . :   Contact the person responsible for program maintenance to  
   determine the cause of the problem. A response of 'D' will cause an RPG      
   formatted dump which may be useful in determining which field has the        
   decimal-data error. However, it may be an intermediate value that has the    
   error, if the error occurred in an expression.                              
 Possible choices for replying to message . . . . . . . . . . . . . . . :      
   D -- Obtain RPG formatted dump.                                              
                                                                        More...
 Reply  . . . :   C                                                            
 Press Enter to continue.                                                      
                                                                               
 F3=Exit   F6=Print   F9=Display message details   F12=Cancel                  
 F21=Select assistance level  

Question: Can I force the system to perform an RPG formatted DUMP for me so the idiots working at night
don't take a 'C' to the error?

Needless to say, I can't recreate the error.

Thanks,

Phil                                                
                                                                               
0
pipster1
Asked:
pipster1
  • 7
  • 4
  • 3
2 Solutions
 
_b_hCommented:
One approach would be to use the system reply list:
You add an entry to the system reply list describing the message and the reply that you want to send. Check out the ADRPYLE command to do this; it allows generic messages, comparison of message data, etc. See the Work with Reply List Entries (WRKRPYLE) command as well to see what messages have already been defined, and to see what order the list is searched.
The next step is to change the overnight job to use the system reply list. You can use of these:
a) CHGJOB INQMSGRPY(*SYSRPYL) within the job stream
b) CHGJOBD your-jobd INQMSGRPY(*SYSRPYL) to change the job description that the job uses, but keep in mind that this will affect ALL jobs that use the job description
c) SBMJOB ... INQMSGRPY(*SYSRPYL) to submit the job so that it will use the system reply list.

A second approach would be to write a program that monitors the QSYSOPR message queue and based the messages that it receives, it can send replies for the messages. It would use RCVMSG to receive the messages and SNDRPY to send the replies, (or use equivalent APIs).  If you are interested in pursuing this option, please post back and I will include more detail.

A third approach is to train the 'idiots'; personally, I have had the most success with threats of death or dismemberment;) Actually, I have had success with training the operators for their next job (tech analyst, programmer, network tech), IF and ONLY IF they perform their operator duties well.

Out of curiousity, what are the obstacles to making it a lights-out environment overnight?

Barry
0
 
pipster1Author Commented:
Barry,

The system reply list sounds pretty good.

It's a 24 hour dispatch a  transportation company, so no lights out.

Let me look at the reply list, the JOBD is only used by this job.

I'll let you know.

Phil
0
 
pipster1Author Commented:
Barry,

When I add the RPYLE entry it asks for the 'message data start position' thus:

***************************************************
                      Change Reply List Entry (CHGRPYLE)                      
                                                                             
Type choices, press Enter.                                                    
                                                                             
Sequence number  . . . . . . . . > 170           1-9999                      
Message identifier . . . . . . .   RNQ0907       Character value, *SAME, *ANY
Compare data:                                                                
  Comparison data  . . . . . . .   'Decimal-data'                            
  Message data start position  .   1             1-999, *SAME, *NONE          
Message reply  . . . . . . . . .   'D'                                        
                                                                             
                           Additional Parameters                              
                                                                             
Dump the sending job . . . . . .   *YES          *SAME, *NO, *YES            
Coded character set ID . . . . .   *JOB          *JOB, *SAME, *HEX...        
                                                                             
***************************************************
When I press F1:

                  Compare data (CMPDTA) - Help                
                                                             
  'comparison-data'                                          
      Specify a character string of no more than 28          
      characters (enclosed in apostrophes if blanks or other  
      special characters are included).  This string is      
      compared with a string of the same length in the        
      message data of the inquiry message, beginning with    
      the first character (if no start value has been        
      specified).                                            
                                                     More...  
  F2=Extended help   F10=Move to top   F11=InfoSeeker        
  F12=Cancel         F20=Enlarge       F24=More keys          
                                                             
 ***************************************************************

  message-data-start                                                      
     Specify the starting character position in the message's replacement
     text (maximum value not to exceed 999) where the comparison data is  
     to be compared with the replacement text.  A start value is not
     valid without a specification of comparison data.              

***************************************************************
Which part is the message data?

                Additional Message Information                        
                                                                               
 Message ID . . . . . . :   RNQ0907       Severity . . . . . . . :   99        
 Message type . . . . . :   Inquiry                                            
 Date sent  . . . . . . :   04/08/06      Time sent  . . . . . . :   00:04:23  
                                                                                                           
 Message . . . . :   Decimal-data error occurred (C G D F).        <-----Is this the message data of the inquiry message?
(If so, does the phrase 'Decimal-data' begin in position 1 of the message data?)
           
 Cause . . . . . :   RPG procedure ONTIME in program PROACTIVE/ONTIME found a  
   decimal-data error at statement 974. A packed or zoned value does not        
   contain valid numeric data.  A digit and/or sign is not valid.              
 Recovery  . . . :   Contact the person responsible for program maintenance to  
   determine the cause of the problem. A response of 'D' will cause an RPG      
   formatted dump which may be useful in determining which field has the        
   decimal-data error. However, it may be an intermediate value that has the    
   error, if the error occurred in an expression.                              
 Possible choices for replying to message . . . . . . . . . . . . . . . :      
   D -- Obtain RPG formatted dump


Thanks,

Phil
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
_b_hCommented:
If you use:
DSPMSGD RANGE(RNQ0907) MSGF(QRNXMSG)
You can see the message text in option 1 and the message data in option 2. For RNQ0907, the first field in the message data &1 is 10 characters long. When you look at &1 in the message text, you see that &1 is the procedure name.
In your sample, replace 'Decimal data' with 'ONTIME    '

Barry
0
 
pipster1Author Commented:
Barry,

Would &1's starting position be 15?

Phil
0
 
daveslaterCommented:
Hi
In the RPG you can change the program to user the *PSSR subroutine, then in the H spec specify the option to dump.

in the *PSSR sun you can then use the DUMP command to force exit the program so the message is never displayed.

Dave
0
 
pipster1Author Commented:
Dave,

How would you code for the *PSSR subroutine?

Phil

0
 
pipster1Author Commented:
Dave,

Also, the system's running v4r3. Arrrggghh!

Phil
0
 
daveslaterCommented:
Hi
It makes no odds the *PSSR has been there since the days of S/38 9may be even the s/34).

If you need some code I'll get it tomorrow, system is doing weekly backups.

Dave
0
 
_b_hCommented:
Starting position for &1 is 1. The message data values are merged in to create the message.
The PSSR idea is a good one too.
You're not alone with the v4r3 system; I am running one as well.
Barry
0
 
daveslaterCommented:
Hi
here is how to code the dump, put a 1 in column 15 of the H spec.

..... *. 1 ...+
     H        1

then the PSSR SR is simple.

 *******************************************          
 *      Standard error handling sub-routine.                     **          
 *******************************************          
C     *PSSR         BEGSR                                                    
 *   Dump program (note 1 must be specified in H-spec.).                      
 *   Dump can be suppressed when testing by setting switch 2 on.              
C                   DUMP                                                      
 *   Exit program with LR.                                                
C                   SETON                                        LR        
C                   RETURN                                                
 *                                                                        
C                   ENDSR                                                  

Regards


Dave.

Note this will trap all errors that would cause the program to crash not just Dec data Error.
0
 
pipster1Author Commented:
Dave,

When I prompt the H spec, all I get is 'KEYWORDS'.

I don't understand. It's an ILE program by the way.

Phil
0
 
daveslaterCommented:
Hi
Sorry when you said V4 I just assumed you used rpg

simply use

H debug(*Yes)

the c specs are then

C     *PSSR         BEGSR                                                  
C                   DUMP                                                  
 *   Exit program with LR.                                              
C                   SETON                                        LR      
C                   RETURN                                              
 *                                                                      
C                   ENDSR                                                


Dave
0
 
pipster1Author Commented:
Thanks to both Barry and Dave.

I split the points because Barry's answer probably would have worked
but I accepted Dave's because it was simple to implement and gave him the greater share of the points.

Hope no feelings are hurt.

Thanks,

Phil
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 7
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now