Topic
  • 12 replies
  • Latest Post - ‏2014-05-06T21:11:33Z by dan_darnell
giocot
giocot
164 Posts

Pinned topic RPG program call example

‏2014-05-03T20:25:35Z |

Hi All

i'm looking for a simple example about calling an RPG program from a RUI Handler (for RBD and not for EGL CE); i have tried following the istrunction at the example at http://www.youtube.com/watch?v=lA25DoElnSc on one my project , but i'm receive this error:

"Uncaught exception occurred during handling of undefined.onClick event
[CRRUI3651E] Service binding key : 'call_rpg' does not exist in the deployment descriptor 'EGLRichUI'

can some one help me with a pratical example or with a suggestion to solve the above problem

Thanks in advance

Updated on 2014-05-03T20:26:58Z at 2014-05-03T20:26:58Z by giocot
  • giocot
    giocot
    164 Posts

    Re: RPG program call example

    ‏2014-05-04T08:42:10Z  

    Hi

    Ok i have found the problem, i had not well configured my .eglbld file; now i don't more receive the error CRRUI3651E, but i receive thi error:

    [CRRUI1071E] None manager exceptions noticed for the call of service. add a manager exceptions for the call of service.  
    EGL0150E is occurred an error in the call to the program callrpg. Error: EGL0006E is occurred an error during the creation of an object type services.callrpg. the following error is occurred: java.lang.ClassNotFoundException: services.callrpg. EGL0001I the error is occurred in callrpg. EGL0002I the error is occurred in callrpg during the elaboration of the function func_rpg.  
    [CRRUI2094E] These are the calls to the function EGL that brings to this error:

    Under the folder EGL Gen/JavaSource i see:  callrpg_Impl.java and callrpg.deploy 

    where i'm wrong ?

    Thanks in advance

     

  • giocot
    giocot
    164 Posts

    Re: RPG program call example

    ‏2014-05-04T13:10:25Z  
    • giocot
    • ‏2014-05-04T08:42:10Z

    Hi

    Ok i have found the problem, i had not well configured my .eglbld file; now i don't more receive the error CRRUI3651E, but i receive thi error:

    [CRRUI1071E] None manager exceptions noticed for the call of service. add a manager exceptions for the call of service.  
    EGL0150E is occurred an error in the call to the program callrpg. Error: EGL0006E is occurred an error during the creation of an object type services.callrpg. the following error is occurred: java.lang.ClassNotFoundException: services.callrpg. EGL0001I the error is occurred in callrpg. EGL0002I the error is occurred in callrpg during the elaboration of the function func_rpg.  
    [CRRUI2094E] These are the calls to the function EGL that brings to this error:

    Under the folder EGL Gen/JavaSource i see:  callrpg_Impl.java and callrpg.deploy 

    where i'm wrong ?

    Thanks in advance

     

    Here

    some my project's files

    Keep in mind that:

    1- The service is in the same project (EGL Rich UI); should be in another type of project ? Ex Web project ? when i created the service's source file i have changed the default build descritor otherwise i receive errors

    2- If i deploy this project and then run in test environment under TOMCAT, i receve this error:

    04/mag/2014 23.20.35.4 EGL1538E:EGL1538Es are occurred a '' exception during the call to a service.  
    EGL0001I The error is occurred in EGL Rich UI Proxy.  
        detail1:500  
        detail2:FAILED  
        detail3:EGL1559E The url used for recalling the service is empty. To specify an URL that makes reference to the service.  
    EGL0001I L' error is occurred in EGL Rich UI Proxy.  
    04/mag/2014 23.20.35.5 EGL1538E:EGL1538Es are occurred a '' exception during the call to a service.  
    EGL0001I L' error is occurred in EGL Rich UI Proxy.  
        detail1:500  
        detail2:FAILED  
        detail3:EGL1559E The url used for recalling the service is empty. To specify an URL that makes reference to the service.  
    EGL0001I L' error is occurred in EGL Rich UI Proxy.

    2- Question: can i test the RPG call from preview ?

    Thanks

    EGLBLD :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE EGL PUBLIC "-//IBM Corporation, Inc.//DTD EGL Build Parts 6.0//EN" "">
    <EGL>
    <BuildDescriptor
        name="test1JavaBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1" sqlValidationConnectionURL="jdbc:as400:192.168.xx.zz;prompt=false;" sqlDB="jdbc:as400:192.168.xx.zz;prompt=false;" sqlID="MYUSER" sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853" dbms="DB2">
    </BuildDescriptor>
    <BuildDescriptor
        name="test1JavaScriptBuildOptions"
        genProject="t_Rui"
        system="JAVASCRIPT"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1"
        linkage="externalPrograms"    >
    </BuildDescriptor>
    <BuildDescriptor
        name="test1DebugBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        dbms="DB2"
        sqlValidationConnectionURL="jdbc:as400:192.168.xx.zz;prompt=false;"
        sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver"
        sqlDB="jdbc:as400:192.168.xx.zz;prompt=false;"
        deploymentDescriptor="test1"
    sqlID="MYUSER" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853">
    </BuildDescriptor>
    <LinkageOptions name="externalPrograms">
            <callLink >
                   <remoteCall pgmName="CALLRPG"
     conversionTable="CSOE037"
     library="MYUSER_EGL"
     location="192.168.xx.zz"
     luwControl="SERVER"
     remoteBind="GENERATION"
     remoteComType="JAVA400"
     remotePgmType="STATELESS" javaWrapper="YES"/>
             </callLink>
     </LinkageOptions>
    </EGL>

    SERVICE

    package services;
    // service
    service callrpg 
        // Function Declarations
        function func_rpg(par string in)
            SysLib.setRemoteUser("MYUSER", "MYPSW");
            parm char(10) = par;
            parm = "1234567890";
            call "CALLRPG" (parm);
            SysLib.writeStdout(parm);
        end
    end

    Some RUI code

    Keep in mind that when i define l_call_rpg i must insert @RestBinding  or similiar,  as if i write "l_call_rpg callrpg { };" i receive error : "IWN.VAL.7519.e 56/21 The use of an empty block of formulations is not allowed with the service or type of interface callrpg. In the Youtube example, there is not value inside the { }.

    ........   

      l_call_rpg callrpg { @RestBinding {} };
                par string;
                call l_call_rpg.func_rpg(par) returning to call_r;
                parm01.parm01_std.action = "02";
                parm01.parm01_d.codice = fld01.text;
                InfoBus.publish(id_myapp_Main, parm01);

    ...........
     

    Updated on 2014-05-04T21:49:36Z at 2014-05-04T21:49:36Z by giocot
  • giocot
    giocot
    164 Posts

    Re: RPG program call example

    ‏2014-05-04T22:26:54Z  
    • giocot
    • ‏2014-05-04T13:10:25Z

    Here

    some my project's files

    Keep in mind that:

    1- The service is in the same project (EGL Rich UI); should be in another type of project ? Ex Web project ? when i created the service's source file i have changed the default build descritor otherwise i receive errors

    2- If i deploy this project and then run in test environment under TOMCAT, i receve this error:

    04/mag/2014 23.20.35.4 EGL1538E:EGL1538Es are occurred a '' exception during the call to a service.  
    EGL0001I The error is occurred in EGL Rich UI Proxy.  
        detail1:500  
        detail2:FAILED  
        detail3:EGL1559E The url used for recalling the service is empty. To specify an URL that makes reference to the service.  
    EGL0001I L' error is occurred in EGL Rich UI Proxy.  
    04/mag/2014 23.20.35.5 EGL1538E:EGL1538Es are occurred a '' exception during the call to a service.  
    EGL0001I L' error is occurred in EGL Rich UI Proxy.  
        detail1:500  
        detail2:FAILED  
        detail3:EGL1559E The url used for recalling the service is empty. To specify an URL that makes reference to the service.  
    EGL0001I L' error is occurred in EGL Rich UI Proxy.

    2- Question: can i test the RPG call from preview ?

    Thanks

    EGLBLD :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE EGL PUBLIC "-//IBM Corporation, Inc.//DTD EGL Build Parts 6.0//EN" "">
    <EGL>
    <BuildDescriptor
        name="test1JavaBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1" sqlValidationConnectionURL="jdbc:as400:192.168.xx.zz;prompt=false;" sqlDB="jdbc:as400:192.168.xx.zz;prompt=false;" sqlID="MYUSER" sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853" dbms="DB2">
    </BuildDescriptor>
    <BuildDescriptor
        name="test1JavaScriptBuildOptions"
        genProject="t_Rui"
        system="JAVASCRIPT"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1"
        linkage="externalPrograms"    >
    </BuildDescriptor>
    <BuildDescriptor
        name="test1DebugBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        dbms="DB2"
        sqlValidationConnectionURL="jdbc:as400:192.168.xx.zz;prompt=false;"
        sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver"
        sqlDB="jdbc:as400:192.168.xx.zz;prompt=false;"
        deploymentDescriptor="test1"
    sqlID="MYUSER" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853">
    </BuildDescriptor>
    <LinkageOptions name="externalPrograms">
            <callLink >
                   <remoteCall pgmName="CALLRPG"
     conversionTable="CSOE037"
     library="MYUSER_EGL"
     location="192.168.xx.zz"
     luwControl="SERVER"
     remoteBind="GENERATION"
     remoteComType="JAVA400"
     remotePgmType="STATELESS" javaWrapper="YES"/>
             </callLink>
     </LinkageOptions>
    </EGL>

    SERVICE

    package services;
    // service
    service callrpg 
        // Function Declarations
        function func_rpg(par string in)
            SysLib.setRemoteUser("MYUSER", "MYPSW");
            parm char(10) = par;
            parm = "1234567890";
            call "CALLRPG" (parm);
            SysLib.writeStdout(parm);
        end
    end

    Some RUI code

    Keep in mind that when i define l_call_rpg i must insert @RestBinding  or similiar,  as if i write "l_call_rpg callrpg { };" i receive error : "IWN.VAL.7519.e 56/21 The use of an empty block of formulations is not allowed with the service or type of interface callrpg. In the Youtube example, there is not value inside the { }.

    ........   

      l_call_rpg callrpg { @RestBinding {} };
                par string;
                call l_call_rpg.func_rpg(par) returning to call_r;
                parm01.parm01_std.action = "02";
                parm01.parm01_d.codice = fld01.text;
                InfoBus.publish(id_myapp_Main, parm01);

    ...........
     

    Hi

    another step forward,

    now,  after compiled "linkage" parameter in .EGLBLD file (sorry but i had not seen ) , i receive this error:

    EGL0150E is occurred an error in the call to the program callrpg. Error: EGL0153E Impossibile to establish a connection. Error: com.ibm.as400.access.AS400SecurityException: Password is not set. EGL0002I The error is occurred in callrpg during the elaboration of the function func_rpg. EGL0002I L' error is occurred in callrpg during the elaboration of the function func_rpg

    I don't understand in my service i have:

    package services;
    // service
    service callrpg 
        // Function Declarations
        function func_rpg(par string in) 
             SysLib.setRemoteUser("MYUSER", "MYPSW");
             parm char(10) = par;
            parm = "1234567890";
            call "callrpg" (parm);
            SysLib.writeStdout(parm);
        end

  • dan_darnell
    dan_darnell
    973 Posts

    Re: RPG program call example

    ‏2014-05-05T19:05:46Z  
    • giocot
    • ‏2014-05-04T22:26:54Z

    Hi

    another step forward,

    now,  after compiled "linkage" parameter in .EGLBLD file (sorry but i had not seen ) , i receive this error:

    EGL0150E is occurred an error in the call to the program callrpg. Error: EGL0153E Impossibile to establish a connection. Error: com.ibm.as400.access.AS400SecurityException: Password is not set. EGL0002I The error is occurred in callrpg during the elaboration of the function func_rpg. EGL0002I L' error is occurred in callrpg during the elaboration of the function func_rpg

    I don't understand in my service i have:

    package services;
    // service
    service callrpg 
        // Function Declarations
        function func_rpg(par string in) 
             SysLib.setRemoteUser("MYUSER", "MYPSW");
             parm char(10) = par;
            parm = "1234567890";
            call "callrpg" (parm);
            SysLib.writeStdout(parm);
        end

    Where original errors are concerned:

    Get rid of the "javaWrapper=YES" attribute in your callLink. It doesn't need to be there.

    Next, I notice that you are only referencing the linkage option in one of your build descriptor segments. You actually don't need it in the one where you put it but it is fine to have it there as long as you also have it in the other two. So add

    linkage="externalPrograms"

     
    to the build descriptor segment "test1JavaBuildOptions" and to the segment "test1DebugBuildOptions". Without the linkage in these other segments the generator does not know to generate call link code in the right places.
     

    I know you are going off of a video made for EGL CE. For an RBD call to a service in the same project as your RUI, use this:

    dataAccessService DataAccessService {@DedicatedService};

    call dataAccessService.myprogram(parm) returning to blahblah

    where "DataAccessService" is your Service part. The @DedicatedService is needed in RBD (in EGL CE you could just use {}. With @DedicatedService you don't need @RestService or any of the manual config required for a REST service.

    Try all of the above and see if you still get "Password not set" error. (I'm especially not sure what effect that unneeded javaWrapper attribute is having on things.)

    Dan

     

     

     

     

     

  • markevans
    markevans
    2885 Posts

    Re: RPG program call example

    ‏2014-05-05T19:57:52Z  
    Where original errors are concerned:

    Get rid of the "javaWrapper=YES" attribute in your callLink. It doesn't need to be there.

    Next, I notice that you are only referencing the linkage option in one of your build descriptor segments. You actually don't need it in the one where you put it but it is fine to have it there as long as you also have it in the other two. So add

    linkage="externalPrograms"

     
    to the build descriptor segment "test1JavaBuildOptions" and to the segment "test1DebugBuildOptions". Without the linkage in these other segments the generator does not know to generate call link code in the right places.
     

    I know you are going off of a video made for EGL CE. For an RBD call to a service in the same project as your RUI, use this:

    dataAccessService DataAccessService {@DedicatedService};

    call dataAccessService.myprogram(parm) returning to blahblah

    where "DataAccessService" is your Service part. The @DedicatedService is needed in RBD (in EGL CE you could just use {}. With @DedicatedService you don't need @RestService or any of the manual config required for a REST service.

    Try all of the above and see if you still get "Password not set" error. (I'm especially not sure what effect that unneeded javaWrapper attribute is having on things.)

    Dan

     

     

     

     

     

    As Dan said, remove the Java Wrapper in the linkage table.  I am not sure what effect it has. 

    Otherwise, from the code, the way you are setting it seems correct, but just make sure it has been published...

    Any chance this service did not get regenerated when you added the remoteUser since it seems you have gone through a lot of permutations.

    Maybe you should do a writeStdout before the call to make sure.

    take care.

  • giocot
    giocot
    164 Posts

    Re: RPG program call example

    ‏2014-05-06T07:12:04Z  
    • markevans
    • ‏2014-05-05T19:57:52Z

    As Dan said, remove the Java Wrapper in the linkage table.  I am not sure what effect it has. 

    Otherwise, from the code, the way you are setting it seems correct, but just make sure it has been published...

    Any chance this service did not get regenerated when you added the remoteUser since it seems you have gone through a lot of permutations.

    Maybe you should do a writeStdout before the call to make sure.

    take care.

    Hi Dan

    thanks for your reply; i have done this:

    1. Deleted javaWrapper="YES"  from .eglbld file (see below)
    2. Added linkage="externalPrograms" in every segment (see below)
    3. Changed the service part definition and call (see below)

    but unfortunatly i have the same problem "Password is not set"

    N.B. If i put a wrong password, i receve "Password is incorrect" strange !!!! no ??

    here the source updated : please can you check if i made the right corrections ?

    Thanks in advance

    p.s. the value  conversionTable="CSOE037" is correct for me ?

     

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE EGL PUBLIC "-//IBM Corporation, Inc.//DTD EGL Build Parts 6.0//EN" "">
    <EGL>
    <BuildDescriptor
        name="test1JavaBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="YES"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1" sqlValidationConnectionURL="jdbc:as400:192.168.zz.xx;prompt=false;" sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;" sqlID="myusr" sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853" dbms="DB2"
        linkage="externalPrograms">
    </BuildDescriptor>
    <BuildDescriptor
        name="test1JavaScriptBuildOptions"
        genProject="t_Rui"
        system="JAVASCRIPT"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1"
        linkage="externalPrograms"
        >
    </BuildDescriptor>
    <BuildDescriptor
        name="test1DebugBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        dbms="DB2"
        sqlValidationConnectionURL="jdbc:as400:192.168.zz.xx;prompt=false;"
        sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver"
        sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;"
        deploymentDescriptor="test1"
    sqlID="myusr" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853"
    linkage="externalPrograms">

    </BuildDescriptor>

    <LinkageOptions name="externalPrograms">
     <callLink >
    <remoteCall pgmName="callrpg"
     conversionTable="CSOE037"
     library="MYUSR_EGL"
     location="192.168.zz.xx"
     luwControl="SERVER"
     remoteBind="GENERATION"
     remoteComType="JAVA400"
     remotePgmType="STATEFUL" />
             </callLink>
     </LinkageOptions>
    </EGL>

    package services;
    // service
    service callrpg 
        // Function Declarations
        function func_rpg(par string in)
             user char(10)= "MYUSR";
             pass char(10)= "MYPSW";
             SysLib.setRemoteUser(user, pass);
            SysLib.writeStdout("---> USR--> " + user + " & PASSWORS --> " + pass  );

            parm char(10) = par;
            call "callrpg" (parm);
       
            SysLib.writeStdout(parm);

        end

    end
     

     

     

  • giocot
    giocot
    164 Posts

    Re: RPG program call example

    ‏2014-05-06T07:29:24Z  
    • giocot
    • ‏2014-05-06T07:12:04Z

    Hi Dan

    thanks for your reply; i have done this:

    1. Deleted javaWrapper="YES"  from .eglbld file (see below)
    2. Added linkage="externalPrograms" in every segment (see below)
    3. Changed the service part definition and call (see below)

    but unfortunatly i have the same problem "Password is not set"

    N.B. If i put a wrong password, i receve "Password is incorrect" strange !!!! no ??

    here the source updated : please can you check if i made the right corrections ?

    Thanks in advance

    p.s. the value  conversionTable="CSOE037" is correct for me ?

     

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE EGL PUBLIC "-//IBM Corporation, Inc.//DTD EGL Build Parts 6.0//EN" "">
    <EGL>
    <BuildDescriptor
        name="test1JavaBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="YES"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1" sqlValidationConnectionURL="jdbc:as400:192.168.zz.xx;prompt=false;" sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;" sqlID="myusr" sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853" dbms="DB2"
        linkage="externalPrograms">
    </BuildDescriptor>
    <BuildDescriptor
        name="test1JavaScriptBuildOptions"
        genProject="t_Rui"
        system="JAVASCRIPT"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        deploymentDescriptor="test1"
        linkage="externalPrograms"
        >
    </BuildDescriptor>
    <BuildDescriptor
        name="test1DebugBuildOptions"
        genProject="t_Rui"
        system="WIN"
        J2EE="NO"
        genProperties="GLOBAL"
        genDataTables="YES"
        dbms="DB2"
        sqlValidationConnectionURL="jdbc:as400:192.168.zz.xx;prompt=false;"
        sqlJDBCDriverClass="com.ibm.as400.access.AS400JDBCDriver"
        sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;"
        deploymentDescriptor="test1"
    sqlID="myusr" sqlPassword="crypto:8980d94d073fab1da5f7449297b5ad61601f30ab6d365853"
    linkage="externalPrograms">

    </BuildDescriptor>

    <LinkageOptions name="externalPrograms">
     <callLink >
    <remoteCall pgmName="callrpg"
     conversionTable="CSOE037"
     library="MYUSR_EGL"
     location="192.168.zz.xx"
     luwControl="SERVER"
     remoteBind="GENERATION"
     remoteComType="JAVA400"
     remotePgmType="STATEFUL" />
             </callLink>
     </LinkageOptions>
    </EGL>

    package services;
    // service
    service callrpg 
        // Function Declarations
        function func_rpg(par string in)
             user char(10)= "MYUSR";
             pass char(10)= "MYPSW";
             SysLib.setRemoteUser(user, pass);
            SysLib.writeStdout("---> USR--> " + user + " & PASSWORS --> " + pass  );

            parm char(10) = par;
            call "callrpg" (parm);
       
            SysLib.writeStdout(parm);

        end

    end
     

     

     

    Hi all

    here some news ..

    if i try from the prewiev i get the error, instead if i deploy the project and run it on my test enviroment over Tomcat, it is work fine .... 

    can some could help me to understand ?

    thanks

     

     

     

     

    Updated on 2014-05-06T07:30:33Z at 2014-05-06T07:30:33Z by giocot
  • markevans
    markevans
    2885 Posts

    Re: RPG program call example

    ‏2014-05-06T13:35:10Z  
    • giocot
    • ‏2014-05-06T07:29:24Z

    Hi all

    here some news ..

    if i try from the prewiev i get the error, instead if i deploy the project and run it on my test enviroment over Tomcat, it is work fine .... 

    can some could help me to understand ?

    thanks

     

     

     

     

    Hi,

    The Preview uses the "Debug" Build descriptor, so maybe the debug build descriptor is not set on the project so that it is picked up correctly.

    It is odd that the "password" incorrect is issued if it is wrong.

    Have you tried logging in using this user/password on a 5250 session.  Maybe it is disabled or has an expired password?

    I know you said it works fine in Tomcat...but I would try with the 5250 session also.

    Finally, CSOE037 means the host is running with code page 37 (English, EBCDIC).  This could cause an issue, but would think it would also be an issue in the runtime situation.

  • giocot
    giocot
    164 Posts

    Re: RPG program call example

    ‏2014-05-06T17:32:26Z  
    • markevans
    • ‏2014-05-06T13:35:10Z

    Hi,

    The Preview uses the "Debug" Build descriptor, so maybe the debug build descriptor is not set on the project so that it is picked up correctly.

    It is odd that the "password" incorrect is issued if it is wrong.

    Have you tried logging in using this user/password on a 5250 session.  Maybe it is disabled or has an expired password?

    I know you said it works fine in Tomcat...but I would try with the 5250 session also.

    Finally, CSOE037 means the host is running with code page 37 (English, EBCDIC).  This could cause an issue, but would think it would also be an issue in the runtime situation.

    Hi Mark

    thanks for your reply;

    sorry i don't understannd when you say "maybe the debug build descriptor is not set on the project so that it is picked up correctly." Could please better explain to me as i can understand ? (sorry but my english is not perfect)   in the yesterday's post (see above) i posted the eglbld file updated with your suggestion , i forgot something ? could you please check if that file now would be Ok ?

    About the user/password i tryed on 5250 and it is Ok .

    at this point i don't konow what to do ...  anyother suggestion ?

    thanks in advance again

    Gio

  • dan_darnell
    dan_darnell
    973 Posts

    Re: RPG program call example

    ‏2014-05-06T20:01:13Z  
    • giocot
    • ‏2014-05-06T17:32:26Z

    Hi Mark

    thanks for your reply;

    sorry i don't understannd when you say "maybe the debug build descriptor is not set on the project so that it is picked up correctly." Could please better explain to me as i can understand ? (sorry but my english is not perfect)   in the yesterday's post (see above) i posted the eglbld file updated with your suggestion , i forgot something ? could you please check if that file now would be Ok ?

    About the user/password i tryed on 5250 and it is Ok .

    at this point i don't konow what to do ...  anyother suggestion ?

    thanks in advance again

    Gio

    On your debug build descriptor you have this:

    sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;"

    On the build descriptor for deployed apps you have this:

    sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;" sqlID="myusr"

    Note the omission of the user ID on the debug side. I think that is your problem.

    Dan

     

  • markevans
    markevans
    2885 Posts

    Re: RPG program call example

    ‏2014-05-06T20:57:58Z  

    On your debug build descriptor you have this:

    sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;"

    On the build descriptor for deployed apps you have this:

    sqlDB="jdbc:as400:192.168.zz.xx;prompt=false;" sqlID="myusr"

    Note the omission of the user ID on the debug side. I think that is your problem.

    Dan

     

    Actually, in this case, the sqlID is the userid used to connect to the database.  It is not used in the remote calls.

    When I was referring to the "default Debug Build Descriptor", it is specifying which build descriptor to use when you are debugging or running the generation.   In your project properties, there is a property called "EGL Default Build Descriptors".  You get to this by selecting the project and from the context menu, choose properties. 

    Under the EGL Default Build Descriptors, you have multiple choices.   One set for the debugger and one for the target system.

    Under Debug, you want to set the Interpretive one to the Debug Build descriptor (test1DebugBuildOptions) and JavaScript to the one associated with "system=JavaScript".

    Try this.  

    Something else to look for... do you have "build automatically" turned on?    I would suggest having this turned on.

    When I Googled this error message, most of the issues had to do with an expired password or disabled user profile.  Make sure the remote server job and its user profile used by this call on the iSeries (under QZRCSVRS) has not been disabled.  

    Have you looked at the job log of the remote server job?  Are there any messages there?  (again the job is QZRCSRVS)

    are there any special characters in your password that might not be translated correctly since this will be converted by the jt400 toolkit.

    I don't really have an explanation of why it works in runtime and not in the debugger or why changing the password to something incorrect changes the error message.   Obviously, something is being passed for it to be known as "incorrect", so I think something on the iSeries side is causing it to push back the "password not set" message.

    I don't know how to do this, but the jt400 toolkit (what is used to do the calls) has a trace capability.  Maybe if you could figure out how to turn this one, then maybe it would show something.

    Finally, I looked around some more (this time using "password is not set AS400" and found this:

    Here is some info from the AS400 helps.

    http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzahh%2Fjvmset.htm

    Based on this, the system name, userid, and password all have to be correct.   The location field is what specifies the host system.  Yours is  location="192.168.zz.xx".   That does not seem like a valid tcpip address..or not one I have seen before.

     

     

  • dan_darnell
    dan_darnell
    973 Posts

    Re: RPG program call example

    ‏2014-05-06T21:11:33Z  
    • markevans
    • ‏2014-05-06T20:57:58Z

    Actually, in this case, the sqlID is the userid used to connect to the database.  It is not used in the remote calls.

    When I was referring to the "default Debug Build Descriptor", it is specifying which build descriptor to use when you are debugging or running the generation.   In your project properties, there is a property called "EGL Default Build Descriptors".  You get to this by selecting the project and from the context menu, choose properties. 

    Under the EGL Default Build Descriptors, you have multiple choices.   One set for the debugger and one for the target system.

    Under Debug, you want to set the Interpretive one to the Debug Build descriptor (test1DebugBuildOptions) and JavaScript to the one associated with "system=JavaScript".

    Try this.  

    Something else to look for... do you have "build automatically" turned on?    I would suggest having this turned on.

    When I Googled this error message, most of the issues had to do with an expired password or disabled user profile.  Make sure the remote server job and its user profile used by this call on the iSeries (under QZRCSVRS) has not been disabled.  

    Have you looked at the job log of the remote server job?  Are there any messages there?  (again the job is QZRCSRVS)

    are there any special characters in your password that might not be translated correctly since this will be converted by the jt400 toolkit.

    I don't really have an explanation of why it works in runtime and not in the debugger or why changing the password to something incorrect changes the error message.   Obviously, something is being passed for it to be known as "incorrect", so I think something on the iSeries side is causing it to push back the "password not set" message.

    I don't know how to do this, but the jt400 toolkit (what is used to do the calls) has a trace capability.  Maybe if you could figure out how to turn this one, then maybe it would show something.

    Finally, I looked around some more (this time using "password is not set AS400" and found this:

    Here is some info from the AS400 helps.

    http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzahh%2Fjvmset.htm

    Based on this, the system name, userid, and password all have to be correct.   The location field is what specifies the host system.  Yours is  location="192.168.zz.xx".   That does not seem like a valid tcpip address..or not one I have seen before.

     

     

    Oops. I knew that. Busy day. I just whipped out that reply without thinking about it when I saw the discrepancy in the two entries.

    Dan