EGL Development User Group

 View Only

 EGL0150E

nick leo's profile image
nick leo posted Tue May 06, 2025 03:56 PM

Created new project and must be missing something stupid. I compared it to a working project but dont see what i am missing. 

Basically RUI app (test.egl) calling a service program (servicepgm.egl) that calls an iseries program ( optout).

Here is the error
EGL0150E An error occurred calling the OPTOUT program. Error: EGL0088E The password or user ID is not correct for connecting to the (user:null) ibmiseries system. Error: The user ID or password contains a character that is not valid.
EGL0002I The error occurred in servicepgm processing the functionName function.
EGL0002I The error occurred in servicepgm processing the functionName function.

rui
package pkg;

import com.ibm.egl.rui.widgets.GridLayout;
import com.ibm.egl.rui.widgets.Button;
import com.ibm.egl.rui.widgets.GridLayoutData;

handler test type RUIhandler {initialUI = [ ui ],onConstructionFunction = start, cssFile="css/opt_out.css", title="test"}
    
    svc servicepgm{@DedicatedService};
    ui GridLayout{ columns = 3, rows = 4, cellPadding = 4, children = [ Button ] };
    Button Button{ layoutData = new GridLayoutData{ row = 1, column = 1 }, text="Button", onClick ::= Button_onClick };
    
    function start()
        
    end

    function optoutfunc_cb()
    end

    function optoutfunc_oe(exp AnyException in)
        e ServiceInvocationException = exp;
        writestdout("from rui " + exp.message); 
        writestdout("from rui " + exp.messageID); 
        writestdout("from rui " + e.detail1); 
        writestdout("from rui " + e.detail2);
        writestdout("from rui " + e.detail3);
    end
    
    function Button_onClick(event Event in)
        call svc.functionName() returning to optoutfunc_cb onException optoutfunc_oe;            
    end    
end

Service
package pkg;

service servicepgm
    
    function functionName()
        try
            setremotesystem();
            call "OPTOUT";
        onException(e AnyException)
            writeStderr("from service " + e.message);
        end
    end
    //=========================
    function setremotesystem()
    //=========================
        try
            sysvar.remoteSystemId = "ibmiseries";
        onException(exception AnyException)
            sysvar.remoteSystemId = "ibmiseries";
        end
    end
end

 

bld descriptor

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE EGL PUBLIC "-//IBM Corporation, Inc.//DTD EGL Build Parts 6.0//EN" "">

<EGL>
<BuildDescriptor
name="opt_out_srvJavaBuildOptions"
genProject="opt_out_srv"
system="WIN"
J2EE="NO"
genProperties="GLOBAL"
genDataTables="YES"
dbms="DB2"
sqlValidationConnectionURL="jdbc:as400:ibmiseries;prompt=false"
sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver"
sqlDB="jdbc:as400:ibmiseries;prompt=false"
deploymentDescriptor="opt_out_srv"
sqlID="xxx" 
sqlPassword="xxx" 
linkage="amspgms" 
serverType="TOMCAT9.X"
sqlJNDIName="jdbc/ams" 
></BuildDescriptor>
<BuildDescriptor
name="opt_out_srvDebugBuildOptions"
genProject="opt_out_srv"
system="WIN"
J2EE="NO"
genProperties="GLOBAL"
genDataTables="YES"
dbms="DB2"
sqlValidationConnectionURL="jdbc:as400:ibmiseries;prompt=false;naming=system;libraries=qs36f,files,coll;secure=false;"
sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver"
sqlDB="jdbc:as400:ibmiseries;prompt=false;naming=system;date format=usa;transaction isolation=none;autocommit=off;secure=false;"
deploymentDescriptor="opt_out_srv"
serverType="TOMCAT9.X"
linkage="amspgms"
sqlID="xxx"
sqlJNDIName="jdbc/ams"
sqlPassword="xxx"
>
</BuildDescriptor>
<LinkageOptions name="amspgms">
    <callLink >
        <remoteCall pgmName="OPTOUT" conversionTable="CSO037" javaWrapper="YES" library="QGPL" location="PROGRAMCONTROLLED" luwControl="SERVER" refreshScreen="YES" remoteBind="GENERATION" remoteComType="JAVA400" remotePgmType="STATEFUL"/></callLink>
</LinkageOptions>
</EGL>

Tom Baranski's profile image
Tom Baranski

Hi Nick

Use the function syslib.setRemoteUser to specify the host credentials. More information can be found here: https://www.ibm.com/docs/en/rbd/9.7.0?topic=syslib-setremoteuser