Calling External Procedure from Java Web based Application

pts.
Tags:
COBOL
i5
IBM
IBM iSeries
J2EE
Java
OS/400
SQL
UDB for iSeries/i5
WebSphere
Below given is a procedure to access a CL Program in iSeries from a Java web based program. create procedure libxxx/proc_name LANGUAGE CL FENCED EXTERNAL NAME 'libxxx/clprogram' PARAMETER STYLE GENERAL The external CL program has other calls to Cobol programs in the same library.The procedure is in a different library.The cobol calls does not have any IN/OUT parameters I would like to know if the above procedure would make any calls to cobol programs inside the defined CL.I tested based on the above procedure and it seems the calls are not being made to any cobol programs inside CL. Anyone please suggest a workaround for the above mentioned problem of why its not making any calls to cobol programs.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Your java app call sql.
sql call cl.

Now in a cl, you can do anything a cl can.

You have qualified (ie add a library name) your external name. This means that your library list is probably the stansard sql libl : ie nothing.

if this is true, you can do :

– qualify your call to cobol
– before calling proc_name, call sql with “set path = *libl” (syntax to be checked)
– in the cl, add a chglibl

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • JoAnnB
    Do you have the Java Toolbox for the iSeries? If you did you could do something like - CommandCall command = new CommandCall(as400,"SBMJOB CMD(CALL PGM(library/program) PARM('" + parm1 + "' '" + parm2 + "')) JOB(job-name)")
    0 pointsBadges:
    report
  • TomLiotta
    I would like to know if the above procedure would make any calls to cobol programs inside the defined CL[/I} There's no way to know from what you showed. We need to see what the CL program does if we're going to guess if it'll call COBOL programs or not. Show the CL. Also, tell us if any errors are returned java when the stored proc is called. What does the java call look like? Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following