Page 1 of 1

VL 15 RUP(SM) failing to run - how to troubleshoot

Posted: Sat May 07, 2022 2:59 am
by adale
Hoping someone might be able to lend some insight here.

Big picture:
IBM i server, CL pgm executes call to VL rdml function (using the CALL PGM(M@EXCHL ... ) to pass parms.
VL rdml function exchanges the parm fields (gets incoming parms), and executes call to VL rdmlx function.
VL rdmlx function received incoming parms, and executes call to VL RUP (a VL Server Module) to process the parm data (in this case use the BIF to send an email).
When it all works fine, the VL RUP returns a response parm back to the VL rdmlx function, which returns the response parm back to the VL rdml function, which returns the response parm back to the CL.
Nice little loop.

My issue is that I made a small change to the RUP, and now it is not executing or not responding (I am not sure which), and I can't find out why?
I even took out the small change, compiled, checked in, still no go.
I have debug code snippets all along the call stack, and can trace the parms from CL, to RDML, to RDMLX, but that is where it stops?

I have searched the normal locations for program errors or crashes, but I must be missing something.
Nothing in MSGW status on the server.
Nothing in the QEZJOBLOG.
Nothing in the lansa subsystem job profile spooled files.
Nothing in err.log

Any other ideas on how to find or troubleshoot when a VL Server Module fails to run is appreciated.

Re: VL 15 RUP(SM) failing to run - how to troubleshoot

Posted: Tue May 10, 2022 12:00 am
by Dino
Hi, As you describe it, the error should be in the log for the call to the CL, I got this for example when I caused an error in the reusable part at the end, running in interactive:

Code: Select all

call test590                                                             
Fatal Error:                                                             
Fatal Error : Component : TEST593    Receive an string returns result    
  Statement : 8 Message : Invalid division operation. Attempt to divide  
  value 99 by zero. Routine : File LpDecimalBuffer at line 1062..        
Library list changed.                                                    
Function TEST592 failed - see second level text for instructions         
Function program @TEST591 failed - see second level text for details     
Possible error while processing file @TEST591 - see second level text for
  details                                                                
Function TEST591 failed - see second level text for instructions         
and if I submit the call to the CL, like this
SBMJOB CMD(CALL PGM(TEST590)) JOB(TESTING)

I get a submitted job stopped with a MSGW, and once I answer D to the crash and get several logs:

Code: Select all

            Device or                       Total
File        Queue       User Data   Status  Pages
QPSRVDMP    QEZDEBUG                 RDY        1
QPDSPJOB    QEZDEBUG                 RDY        7
QPPGMDMP    QEZDEBUG                 RDY        1
QPJOBLOG    QEZJOBLOG   TESTING      RDY        4
where the qpjoblog between other things says:

Code: Select all

CPF9898    Diagnostic              40   05/09/22  09:59:45.505287  X_USV        DCXPGMLIB   *STMT    *EXT              
                                     From module . . . . . . . . :   X_UIMER2                                          
                                     From procedure  . . . . . . :   IssueEventMessage                                 
                                     Statement . . . . . . . . . :   10                                                
                                     Message . . . . :   Fatal Error : Component : TEST593    Receive an string        
                                       returns result Statement : 8 Message : Invalid division operation. Attempt      
                                       to divide value 99 by zero. Routine : File LpDecimalBuffer at line 1062..       
This is my TEST590 CL:

Code: Select all

 *************** Beginning of data ****************************
 PGM                                                           
              DCL        VAR(&TXT) TYPE(*CHAR) LEN(10)         
              CHGVAR     VAR(&TXT) VALUE('99')                 
              CALL       PGM(M@EXCHL) PARM('CLR')              
 /*                   1234567890ABCDE  */                      
 CALL M@EXCHL ('PUT' 'TEXT10    A0100' &TXT     )              
              LANSA      REQUEST(RUN) PROCESS(TEST59  ) +      
                           FUNCTION(TEST591) PARTITION(RHO) +  
                           LANGUAGE(ENG)                       
 ENDPGM                                                        
 ****************** End of data *******************************
and the TEST591 RDML FUNCTION:

Code: Select all

Function Options(*DIRECT)
* Its an RDML Function, receives #TEXT10, calls test592 rdmlx function, receives STD_AMNT response
Define Field(#TEXT10) Type(*CHAR) Length(10) Decimals(0)
* Change Field(#TEXT10) To('''150''')
Exchange Fields(#TEXT10)
Call Process(*DIRECT) Function(TEST592)
Display Fields(#STD_AMNT)
Return
and the TEST592 RDMLX FUNCTION:

Code: Select all

Function Options(*DIRECT)
* Its an RDMLX Function, receives #TEXT10, moves to #STD_STRNG and calls test593 rdmlx reusable part
Define Field(#TEXT10) Type(*CHAR) Length(10) Decimals(0)
Define_Com Class(#TEST593) Name(#TEST593)
#STD_STRNG := #TEXT10
#TEST593.PerformCalculation Inputval(#STD_STRNG) Resultval(#STD_AMNT)
Exchange Fields(#STD_AMNT)
Return
and the TEST593 REUSABLE PART:

Code: Select all

Function Options(*Direct)
Begin_Com Role(*EXTENDS #PRIM_OBJT)
Mthroutine Name(PerformCalculation)
Define_Map For(*Input) Class(#STD_STRNG) Name(#InputVal)
Define_Map For(*Result) Class(#STD_AMNT) Name(#ResultVal)

* #ResultVal := #InputVal.AsNumber / 2
#ResultVal := #InputVal.AsNumber / 0
Endroutine
End_Com
maybe check your jobd, mine have this values:

Code: Select all

Message logging:                          
  Level  . . . . . . . . . . . .   4      
  Severity . . . . . . . . . . .   00     
  Text . . . . . . . . . . . . .   *SECLVL

Re: VL 15 RUP(SM) failing to run - how to troubleshoot

Posted: Tue May 10, 2022 12:05 am
by Dino
and yes you should get also an x_err.txt I just checked and I have one:

Code: Select all

 Browse : /lansa_DCXpgmlib/x_lansa/log/x_err.log                                          
 Record :     296   of     328 by  18                      Column :    1     79 by 131    
 Control :                                                                                
                                                                                          
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9
==============================================================================            
Mon May  9 09:57:26 2022                                                                  
Version 15.0.0 Build 4403 IBM i                                                           
Component : TEST593                                                                       
   Receive an string returns result                                                       
Statement : 8                                                                             
Message : Invalid division operation. Attempt to divide value 99 by zero.                 
Routine : File LpDecimalBuffer at line 1062.                                              
Job Number: 130852 OS User : DINO                                                     
ITRO=N ITRL=9 ITRM=999999999 ITRC=ALL PROC=*IRPG PART=RHO LANG=ENG DATS=S                 
ROOT=/LANSA_DCXpgmlib                                                                     
==============================================================================            

Re: VL 15 RUP(SM) failing to run - how to troubleshoot

Posted: Tue May 10, 2022 9:44 pm
by adale
Dino,
The error messages and reporting you show are exactly what I was expecting, and am used to seeing.
I spent quite a bit of time with John Bo yesterday, and here is what was deduced.

The troubleshooting process was to step by step scale down the RUP to it's simplest form, till it would complete without an error, or produce an error log.

The first step was to comment out the Email BIF commands.
Within the Email BIF commands, I had code snippets to write out to a log file on the i Series server so we could answer the user question "Did my email get generated/sent?"

This quickly produced an error in which I did not have the "Insert" command correct (missing a key field population).
Once I corrected the insert command, I was able to un-comment the Email BIF commands, and it all worked.

The Lansa Email BIF, utilizes the IBM i Mail Service Framework (which is an interesting animal in itself), and seems to leave all error handling to the MSF. In our case, we do not have MSF journaling and other error logging turned on, as we had never set up the MSF for full email use, just the base required pieces of Host and smtp settings so that VL could send out an email. This was done years ago when we were initially on V13, and basically hasn't been touched since.

Since my original error was happening within the Email BIF set of commands, and we have not error logging in our MSF turned on, this is why we could not find any error log, MSGW, spooled file, etc. Interesting.

Hope this might help someone else as well.