Illegal Instruction - TKIT400 Error

Issue #33 resolved
Brian Jerome created an issue

I'm not sure exactly what could be causing this. I am getting an Illegal instruction error using the experimental toolkit and running sql directly results in the following error message:

#!

Message: [CEE9901] Application error.  

MCH3601 unmonitored by TKIT400 at statement 0000000016, instruction X'0000'. 

Cause . . . . . :   
The application ended abnormally because an exception occurred and was not handled.  
The name of the program to which the unhandled exception is sent is TKIT400 PASETOILE. 
The program was stopped at the high-level language statement number(s) at the time the message was sent.  
If more than one statement number is shown, the program is an optimized ILE program.  
Optimization does not allow a single statement number to be determined.  
If *N is shown as a value, it means the real value was not available. 

Recovery  . . . :   
See the low level messages previously listed to locate the cause of the exception.  
Correct any errors, and then try the request again.

Here's the test PGM:

H AlwNull(*UsrCtl)
    dcl-ds oDS qualified;
        outputA char(7);
        outputB char(1);
    end-ds;


    dcl-pr Main extpgm;
        inputOne packed(8:0);
        outArray packed(8:0) dim(100);
        bothArray packed(8:0) dim(100);
        outDS likeds(oDS) dim(100);
        outCount int(10);
        last char(8);
    end-pr;


    dcl-pi Main;
        inputOne packed(8:0);
        outArray packed(8:0) dim(100);
        bothArray packed(8:0) dim(100);
        outDS likeds(oDS) dim(100);
        outCount int(10);
        last char(8);
    end-pi;


    last = 'last';
    outCount = 1;
    return;

Test JSON input:

{"pgm":[{"name":"DRTEST05","lib":"BJEROME"},
    {"s":{"name":"inputOne","type":"8p0","by":"in","value":""}},
    {"s":{"name":"outArray","type":"8p0","by":"out","dim":100}},
    {"s":{"name":"bothArray","type":"8p0","by":"both","dim":100,"value":""}},
    {"ds":[
        {"name":"outDS","by":"out","dim":100,"dou":"outCount"},
        {"s":[
            {"name":"outputA","type":"7a"},
            {"name":"outputB","type":"1a"}
        ]}
    ]},
    {"s":{"name":"outCount","type":"10i0","by":"out"}},
    {"s":{"name":"last","type":"8a","by":"out"}}
]}

No output should be expected -- just created this to reproduce the error. I think it might have something to do with the "bothArray" param.

Comments (2)

  1. Former user Account Deleted

    Ok, new fix version. Fix problem with arrays out packed/zoned (dim > 1). Also, ILE proc side, input no "value":"" default "name":"outArray" (ok on PASE, bad ILE).

    Yips Super Driver - test driver - 1.1.4-sg15 toolkit array s records error packed/zoned (Brian)

    bash-4.3$ ./test4000_sql400json_procj32 ../json/j0150_pgm_brian01-s-dim
    input(5000000):
    {"pgm":[{"name":"BRIAN01","lib":"DB2JSON"},
        {"s":{"name":"inputOne","type":"8p0","by":"in","value":""}},
        {"s":{"name":"outArray","type":"8p0","by":"out","dim":100}},
        {"s":{"name":"bothArray","type":"8p0","by":"both","dim":100,"value":""}},
        {"ds":[
            {"name":"outDS","by":"out","dim":100,"dou":"outCount"},
            {"s":[
                {"name":"outputA","type":"7a"},
                {"name":"outputB","type":"1a"}
            ]}
        ]},
        {"s":{"name":"outCount","type":"10i0","by":"out"}},
        {"s":{"name":"last","type":"8a","by":"out"}}
    ]}
    
    
    output(948):
    {"script":[{"pgm":["BRIAN01","DB2JSON",{"outArray":
    [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]},
    {"bothArray":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]},
    {"outDS":[[{"outputA":""},{"outputB":""}]]},
    {"outCount":1},
    {"last":"last"}]}]}
    
    result:
    success (0)
    

    BTW -- Apologies, I named some of your good contribute rpg tests 'Danny' (i think). I will try to keep issue finder names straight in future (try, i say).

  2. Brian Jerome reporter

    Thanks. The other PGMs I've marked with this issue were all running successfully now with the SQL call.

    The experimental is still getting the Illegal instruction - core dumped -- but that might be another issue (from me who knows yet). I'll mark resolved for now!

  3. Log in to comment