Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CTG ECI request - JAVA client program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
ramco_sita

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Mon Jul 09, 2007 8:49 pm    Post subject: CTG ECI request - JAVA client program
Reply with quote

Hi this is the code that i am using to communicate to CICS z/os server using the sample code - ECIRequest.
In the CICS TS v2.3 on Z/os the TCPIP listener program is active.
Network connection is working properly ...
when i run the java code i get a return code -27(which is security error) I am not sure whether it is happening in my windows environment or while communicating to z/os cics server.
The code is as follows?(please need your help where i am going wrong)import com.ibm.ctg.client.JavaGateway;
import com.ibm.ctg.client.*;
import java.io.*;
public class Comm
{
public static void main(String args[]) throws IOException
{
try
{
JavaGateway jg = new JavaGateway("localhost",2006);
byte commarea[] = ("abcd").getBytes("IBM037");
ECIRequest req= new ECIRequest(ECIRequest.ECI_SYNC,"CICS1",null,null,"m22ap03","m22c",commarea,100,
ECIRequest.ECI_NO_EXTEND,
ECIRequest.ECI_LUW_NEW);
System.out.println("Comm in: " + new String(req.Commarea, "IBM037"));
jg.flow(req);
System.out.println("Comm out: " + new String(req.Commarea, "IBM037"));
System.out.println("Rc: " + req.getRc());
jg.close();
}catch (IOException ioe) {
System.out.println("Handled exception: " + ioe.toString());
}
}

----I get return code -27
Back to top
View user's profile Send private message

Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Tue Jul 10, 2007 7:48 am    Post subject:
Reply with quote

to determine if CICS security error, ask your techsupport. there should be a related security message coming from the CICS region.

or
try executing the CICS program from green screen 3270
Back to top
View user's profile Send private message
ramco_sita

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Tue Jul 10, 2007 9:48 am    Post subject: Re: CTG ECI request - JAVA client program
Reply with quote

Thanks earl
Thru telnet port 23 i am able to access my program.
When i try to access it from my java client program using CTG ECIRequest i am getting -27 error.
Which is a security error.
I need some help on understanding the getRC method???
Would like to know whether i have coded it properly.
I am new to JAVA, please some one help us solve this issue...

Thanks!
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Tue Jul 10, 2007 7:17 pm    Post subject:
Reply with quote

ramco_sita,

How are you determing -27 error is security problem?

are you sure you are pointing to correct CICS region ?

-Earl
Back to top
View user's profile Send private message
ramco_sita

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Tue Jul 10, 2007 8:53 pm    Post subject:
Reply with quote

I am pointing to the correct CICS region.
The only thing i would like to know is do i have to have a webserver to run this java program.
Do i need to change any security settings in the z/os for the ecirequest???
Do i have to mirror the transaction names i use in the ECIREquest - in the CICS z/os
i really need to resolve this ----
thanks in advance
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Tue Jul 10, 2007 9:31 pm    Post subject:
Reply with quote

I don't understand your comment "mirror the transaction names"

Are you linking to a program that in turn is expected to execute
a CICS transaction ?


can you submit an http request from browser to invoke your program?
ask you systems people for correct syntext:::
http://URLADDRESS/cics/cwba/PROGNAME
Back to top
View user's profile Send private message
Nimesh.Srivastava

New User


Joined: 30 Nov 2006
Posts: 78
Location: SINGAPORE

PostPosted: Wed Jul 11, 2007 7:13 am    Post subject:
Reply with quote

Earl,
Quote:
I don't understand your comment "mirror the transaction names"

while initiating a ECI request from CICS client you can specify how the transaction would be run on the CICS server end whether as mirror transaction i.e. CPMI or with the actual name of the transaction as defined in RCT entries of your CICS region.

ramco_sita,
the security error that you are encountering while making a ECI request. What is the value of the eci_version you are passing to the CICS server and does your shop requires a different userid / password rather than default cics user (it depends on the security settings of the region), if yes you might need to specify the same in eci_userid & eci_password variables of EciParms structure.

Hope this helps
Nimesh
Back to top
View user's profile Send private message
ramco_sita

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Wed Jul 11, 2007 12:14 pm    Post subject:
Reply with quote

Hi Nimesh

In the CICS region when they enabled the TCPIPSERVICE(ECI) the security is set to local.
so we are using the default user id and directly invoking the CICS Tranaction and program thru the ECIRequest.

Am i missing anything in my code.
Do i have to have an websphere application server on the windows...
I am totally lost ---
Back to top
View user's profile Send private message
Nimesh.Srivastava

New User


Joined: 30 Nov 2006
Posts: 78
Location: SINGAPORE

PostPosted: Tue Jul 17, 2007 7:32 am    Post subject:
Reply with quote

ramco_sita,
do one thing, from your CICS client on windows go to CICS terminal and login with a valid user id and initiate your transaction using EXEC CICS START TRAN. On the server-end see whether the transaction is initiated and has run. If yes, then code the same userid and password in your ECI request and test again, it should go through if its because of a userid security validation. If no, then you can ask your system people why is default userid / test userid not working.

Hope this helps
Nimesh
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us